pub enum Type {
Show 21 variants
Float(FloatRules),
Double(DoubleRules),
Int32(Int32Rules),
Int64(Int64Rules),
Uint32(UInt32Rules),
Uint64(UInt64Rules),
Sint32(SInt32Rules),
Sint64(SInt64Rules),
Fixed32(Fixed32Rules),
Fixed64(Fixed64Rules),
Sfixed32(SFixed32Rules),
Sfixed64(SFixed64Rules),
Bool(BoolRules),
String(StringRules),
Bytes(BytesRules),
Enum(EnumRules),
Repeated(Box<RepeatedRules>),
Map(Box<MapRules>),
Any(AnyRules),
Duration(DurationRules),
Timestamp(TimestampRules),
}Variants§
Float(FloatRules)
Scalar Field Types
Double(DoubleRules)
Int32(Int32Rules)
Int64(Int64Rules)
Uint32(UInt32Rules)
Uint64(UInt64Rules)
Sint32(SInt32Rules)
Sint64(SInt64Rules)
Fixed32(Fixed32Rules)
Fixed64(Fixed64Rules)
Sfixed32(SFixed32Rules)
Sfixed64(SFixed64Rules)
Bool(BoolRules)
String(StringRules)
Bytes(BytesRules)
Enum(EnumRules)
Complex Field Types
Repeated(Box<RepeatedRules>)
Map(Box<MapRules>)
Any(AnyRules)
Well-Known Field Types
Duration(DurationRules)
Timestamp(TimestampRules)
Implementations§
Source§impl Type
impl Type
Sourcepub fn merge(
field: &mut Option<Type>,
tag: u32,
wire_type: WireType,
buf: &mut impl Buf,
ctx: DecodeContext,
) -> Result<(), DecodeError>
pub fn merge( field: &mut Option<Type>, tag: u32, wire_type: WireType, buf: &mut impl Buf, ctx: DecodeContext, ) -> Result<(), DecodeError>
Decodes an instance of the message from a buffer, and merges it into self.
Sourcepub fn encoded_len(&self) -> usize
pub fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Trait Implementations§
impl StructuralPartialEq for Type
Auto Trait Implementations§
impl !Freeze for Type
impl RefUnwindSafe for Type
impl Send for Type
impl Sync for Type
impl Unpin for Type
impl UnwindSafe for Type
Blanket Implementations§
Source§impl<T> AnyExt for T
impl<T> AnyExt for T
Source§fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
Attempts to downcast this to
T behind referenceSource§fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
Attempts to downcast this to
T behind mutable referenceSource§fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
Attempts to downcast this to
T behind Rc pointerSource§fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
Attempts to downcast this to
T behind Arc pointerSource§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