asMessage {RProtoBuf} | R Documentation |
coerce an object to a protobuf message
Description
coerce an object to the Message class.
This is a short-hand to the as method with the
Class
argument set to "Message"
Usage
asMessage(x, ...)
Arguments
x |
object to coerce to a protobuf message |
... |
Passed to |
Value
a Message object
Author(s)
Romain Francois <francoisromain@free.fr>
Examples
# coerce a message type descriptor to a message
asMessage( tutorial.Person )
# coerce a enum descriptor
asMessage( tutorial.Person.PhoneType )
# coerce a field descriptor
asMessage( tutorial.Person$email )
# coerce a file descriptor
asMessage( fileDescriptor( tutorial.Person ) )
[Package RProtoBuf version 0.4.22 Index]