pub struct ProtoField {
pub name: String,
pub number: i64,
pub type_name: String,
pub wire_type: ProtoWireType,
pub cardinality: ProtoFieldCardinality,
pub oneof: Option<String>,
pub map_key_type: Option<String>,
pub map_value_type: Option<String>,
pub options: BTreeMap<String, String>,
pub line: u32,
}Expand description
Fully owned protobuf field contract.
Fields§
§name: StringField name as declared.
number: i64Positive protobuf field number.
type_name: StringDeclared scalar, enum, message, or map value type.
wire_type: ProtoWireTypeKnown protobuf wire encoding.
cardinality: ProtoFieldCardinalityDeclared field cardinality.
oneof: Option<String>Enclosing oneof name when this is a oneof alternative.
map_key_type: Option<String>Map key type when this is a map field.
map_value_type: Option<String>Map value type when this is a map field.
options: BTreeMap<String, String>Generator-relevant field options.
line: u32One-based declaration line.
Trait Implementations§
Source§impl Clone for ProtoField
impl Clone for ProtoField
Source§fn clone(&self) -> ProtoField
fn clone(&self) -> ProtoField
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProtoField
impl Debug for ProtoField
Source§impl<'de> Deserialize<'de> for ProtoField
impl<'de> Deserialize<'de> for ProtoField
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ProtoField
Source§impl PartialEq for ProtoField
impl PartialEq for ProtoField
Source§impl Serialize for ProtoField
impl Serialize for ProtoField
impl StructuralPartialEq for ProtoField
Auto Trait Implementations§
impl Freeze for ProtoField
impl RefUnwindSafe for ProtoField
impl Send for ProtoField
impl Sync for ProtoField
impl Unpin for ProtoField
impl UnsafeUnpin for ProtoField
impl UnwindSafe for ProtoField
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.