pub struct Constant {
pub name: String,
pub offset: u32,
pub ty: ConstantType,
pub default: Option<Vec<u8>>,
}Expand description
One named constant of a buffer.
Fields§
§name: StringThe constant’s name in the source.
offset: u32Byte offset in the buffer.
ty: ConstantTypeThe constant’s type and layout.
default: Option<Vec<u8>>The default value the source states, as bytes of the constant’s layout.
Trait Implementations§
impl Eq for Constant
Source§impl Ord for Constant
impl Ord for Constant
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Constant
impl PartialOrd for Constant
impl StructuralPartialEq for Constant
Auto Trait Implementations§
impl Freeze for Constant
impl RefUnwindSafe for Constant
impl Send for Constant
impl Sync for Constant
impl Unpin for Constant
impl UnsafeUnpin for Constant
impl UnwindSafe for Constant
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