pub struct RawField<'a> {
pub field_id: u64,
pub wire_type: FieldWireType,
pub data: &'a [u8],
}Expand description
A raw TLV field before type-specific interpretation.
Produced by BlockReader::next_field. The caller matches on
field_id to decide which struct field to populate, and uses
wire_type to interpret data:
Varint:datacontains the raw varint bytes (usedecode_varint_valueto extract theu64).Bytes/Nested:datais the length-prefixed payload (the length prefix has already been consumed).
Unknown field IDs should be silently skipped for forward compatibility.
Fields§
§field_id: u64§wire_type: FieldWireType§data: &'a [u8]Auto Trait Implementations§
impl<'a> Freeze for RawField<'a>
impl<'a> RefUnwindSafe for RawField<'a>
impl<'a> Send for RawField<'a>
impl<'a> Sync for RawField<'a>
impl<'a> Unpin for RawField<'a>
impl<'a> UnsafeUnpin for RawField<'a>
impl<'a> UnwindSafe for RawField<'a>
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