pub struct Field(/* private fields */);Implementations§
source§impl Field
impl Field
pub fn new<'a, T: IntoBytes<FieldValue> + TryFrom<&'a FieldValue, Error = ConversionError>>( tag: Tag, value: T ) -> Self
pub fn from_bytes(tag: Tag, value: Vec<u8>) -> Self
pub fn tag(&self) -> Tag
pub fn value(&self) -> &FieldValue
pub fn as_value<'a, T>(&'a self) -> Result<T, ConversionError>where T: TryFrom<&'a FieldValue, Error = ConversionError>,
pub fn get_total(&self) -> u32
pub fn bytes_len(&self) -> u32
Trait Implementations§
source§impl PartialEq<Field> for Field
impl PartialEq<Field> for Field
impl Eq for Field
impl StructuralEq for Field
impl StructuralPartialEq for Field
Auto Trait Implementations§
impl RefUnwindSafe for Field
impl Send for Field
impl Sync for Field
impl Unpin 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