pub struct GenericFieldDesc {
pub name: String,
pub offset: usize,
pub size: usize,
pub field_type: FieldType,
pub default_value: Vec<u8>,
}Expand description
Descriptor for a single field in a dynamically-defined protocol layer.
Fields§
§name: StringField name (must be unique within the protocol).
offset: usizeByte offset from the start of the layer.
size: usizeField size in bytes.
field_type: FieldTypeHow to interpret the raw bytes.
default_value: Vec<u8>Default value used by the builder when no explicit value is given.
Should be size bytes long; builder pads/truncates as needed.
Trait Implementations§
Source§impl Clone for GenericFieldDesc
impl Clone for GenericFieldDesc
Source§fn clone(&self) -> GenericFieldDesc
fn clone(&self) -> GenericFieldDesc
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GenericFieldDesc
impl RefUnwindSafe for GenericFieldDesc
impl Send for GenericFieldDesc
impl Sync for GenericFieldDesc
impl Unpin for GenericFieldDesc
impl UnsafeUnpin for GenericFieldDesc
impl UnwindSafe for GenericFieldDesc
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