pub struct Tag {
pub field_number: FieldNumber,
pub wire_type: WireType,
}Expand description
A protobuf tag containing field number and wire type
Fields§
§field_number: FieldNumber§wire_type: WireTypeImplementations§
Source§impl Tag
impl Tag
Sourcepub fn to_encoded(self) -> Varint
pub fn to_encoded(self) -> Varint
Build the encoded tag value as a Varint.
Sourcepub fn from_encoded(encoded: Varint) -> Result<Self>
pub fn from_encoded(encoded: Varint) -> Result<Self>
Parse a tag from a Varint value.
Trait Implementations§
impl Copy for Tag
impl Eq for Tag
impl StructuralPartialEq for Tag
Auto Trait Implementations§
impl Freeze for Tag
impl RefUnwindSafe for Tag
impl Send for Tag
impl Sync for Tag
impl Unpin for Tag
impl UnwindSafe for Tag
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