pub struct Field {
pub name: String,
pub doc: String,
pub type_name: String,
pub repeated: bool,
pub number: u32,
pub options: FieldOptions,
}Expand description
One field of a message.
Fields§
§name: StringThe proto field name. The key it names in the document is Field::key.
doc: StringThe comment block above it, joined into one paragraph.
type_name: StringThe declared type: a scalar (string, uint32, int64, bool) or a message or
enum name declared in the same file.
repeated: boolDeclared repeated: the document carries a list.
number: u32The proto field number. Unused by the projections; kept so the file round-trips.
options: FieldOptionsThe custom options it carries.
Implementations§
Trait Implementations§
impl Eq for Field
impl StructuralPartialEq for Field
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.