[][src]Struct protobuf::reflect::FieldDescriptor

pub struct FieldDescriptor { /* fields omitted */ }

Dynamic field

Methods

impl FieldDescriptor[src]

pub fn proto(&self) -> &'static FieldDescriptorProto[src]

Protobuf field descriptor

pub fn name(&self) -> &'static str[src]

Field protobuf name

pub fn is_repeated(&self) -> bool[src]

If field repeated?

pub fn has_field(&self, m: &dyn Message) -> bool[src]

Is field set?

pub fn len_field(&self, m: &dyn Message) -> usize[src]

Get length of repeated or map field

pub fn get_message<'a>(&self, m: &'a dyn Message) -> &'a dyn Message[src]

Get singular message

pub fn get_enum(&self, m: &dyn Message) -> &'static EnumValueDescriptor[src]

Get singular enum

pub fn get_str<'a>(&self, m: &'a dyn Message) -> &'a str[src]

Get singular string

pub fn get_bytes<'a>(&self, m: &'a dyn Message) -> &'a [u8][src]

Get singular bytes

pub fn get_u32(&self, m: &dyn Message) -> u32[src]

Get singular u32

pub fn get_u64(&self, m: &dyn Message) -> u64[src]

Get singular u64

pub fn get_i32(&self, m: &dyn Message) -> i32[src]

Get singular i32

pub fn get_i64(&self, m: &dyn Message) -> i64[src]

Get singular i64

pub fn get_bool(&self, m: &dyn Message) -> bool[src]

Get singular bool

pub fn get_f32(&self, m: &dyn Message) -> f32[src]

Get singular f32

pub fn get_f64(&self, m: &dyn Message) -> f64[src]

Get singular f64

pub fn get_reflect<'a>(&self, m: &'a dyn Message) -> ReflectFieldRef<'a>[src]

Get a field

Auto Trait Implementations

impl !Send for FieldDescriptor

impl !Sync for FieldDescriptor

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]