pub enum Field {
Singular(Option<Value>),
Repeated(Vec<Value>),
}Expand description
A message field value.
Variants§
Singular(Option<Value>)
A field with a single value.
Repeated(Vec<Value>)
A field with several (repeated) values.
Implementations§
Source§impl Field
impl Field
Sourcepub fn new(field: &FieldDescriptor) -> Field
pub fn new(field: &FieldDescriptor) -> Field
Creates a field given a Protobuf descriptor.
Sourcepub fn merge_from(
&mut self,
descriptors: &Descriptors,
field: &FieldDescriptor,
input: &mut CodedInputStream<'_>,
wire_type: WireType,
) -> Result<()>
pub fn merge_from( &mut self, descriptors: &Descriptors, field: &FieldDescriptor, input: &mut CodedInputStream<'_>, wire_type: WireType, ) -> Result<()>
Merge data from the given input stream into this field.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Field
impl RefUnwindSafe for Field
impl Send for Field
impl Sync for Field
impl Unpin for Field
impl UnsafeUnpin for Field
impl UnwindSafe for Field
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more