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
Source§impl Serialize for Constant
impl Serialize for Constant
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Constant
Auto Trait Implementations§
impl Forget for Constant
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