pub struct FlagsAndTimestamp { /* private fields */ }Expand description
has_side_effects: If set, the block can have side effects that change external state. Default is true has_only_data: If set, the block does only contain data and no executable instructions. Default is false
Implementations§
Source§impl FlagsAndTimestamp
impl FlagsAndTimestamp
Sourcepub const fn into_bytes(self) -> [u8; 8]
pub const fn into_bytes(self) -> [u8; 8]
Sourcepub const fn from_bytes(bytes: [u8; 8]) -> Self
pub const fn from_bytes(bytes: [u8; 8]) -> Self
Converts the given bytes directly into the bitfield struct.
Source§impl FlagsAndTimestamp
impl FlagsAndTimestamp
Sourcepub fn block_type(&self) -> <BlockType as Specifier>::InOut
pub fn block_type(&self) -> <BlockType as Specifier>::InOut
Returns the value of block_type.
Sourcepub fn block_type_or_err(
&self,
) -> Result<<BlockType as Specifier>::InOut, InvalidBitPattern<<BlockType as Specifier>::Bytes>>
pub fn block_type_or_err( &self, ) -> Result<<BlockType as Specifier>::InOut, InvalidBitPattern<<BlockType as Specifier>::Bytes>>
Returns the value of block_type.
§Errors
If the returned value contains an invalid bit pattern for block_type.
Sourcepub fn with_block_type(self, new_val: <BlockType as Specifier>::InOut) -> Self
pub fn with_block_type(self, new_val: <BlockType as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of block_type set to the given value.
§Panics
If the given value is out of bounds for block_type.
Sourcepub fn with_block_type_checked(
self,
new_val: <BlockType as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_block_type_checked( self, new_val: <BlockType as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of block_type set to the given value.
§Errors
If the given value is out of bounds for block_type.
Sourcepub fn set_block_type(&mut self, new_val: <BlockType as Specifier>::InOut)
pub fn set_block_type(&mut self, new_val: <BlockType as Specifier>::InOut)
Sets the value of block_type to the given value.
§Panics
If the given value is out of bounds for block_type.
Sourcepub fn set_block_type_checked(
&mut self,
new_val: <BlockType as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_block_type_checked( &mut self, new_val: <BlockType as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of block_type to the given value.
§Errors
If the given value is out of bounds for block_type.
Sourcepub fn has_side_effects(&self) -> <bool as Specifier>::InOut
pub fn has_side_effects(&self) -> <bool as Specifier>::InOut
Returns the value of has_side_effects.
Sourcepub fn has_side_effects_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn has_side_effects_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of has_side_effects.
§Errors
If the returned value contains an invalid bit pattern for has_side_effects.
Sourcepub fn with_has_side_effects(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_has_side_effects(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of has_side_effects set to the given value.
§Panics
If the given value is out of bounds for has_side_effects.
Sourcepub fn with_has_side_effects_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_has_side_effects_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of has_side_effects set to the given value.
§Errors
If the given value is out of bounds for has_side_effects.
Sourcepub fn set_has_side_effects(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_has_side_effects(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of has_side_effects to the given value.
§Panics
If the given value is out of bounds for has_side_effects.
Sourcepub fn set_has_side_effects_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_has_side_effects_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of has_side_effects to the given value.
§Errors
If the given value is out of bounds for has_side_effects.
Sourcepub fn has_only_data(&self) -> <bool as Specifier>::InOut
pub fn has_only_data(&self) -> <bool as Specifier>::InOut
Returns the value of has_only_data.
Sourcepub fn has_only_data_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn has_only_data_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of has_only_data.
§Errors
If the returned value contains an invalid bit pattern for has_only_data.
Sourcepub fn with_has_only_data(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_has_only_data(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of has_only_data set to the given value.
§Panics
If the given value is out of bounds for has_only_data.
Sourcepub fn with_has_only_data_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_has_only_data_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of has_only_data set to the given value.
§Errors
If the given value is out of bounds for has_only_data.
Sourcepub fn set_has_only_data(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_has_only_data(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of has_only_data to the given value.
§Panics
If the given value is out of bounds for has_only_data.
Sourcepub fn set_has_only_data_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_has_only_data_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of has_only_data to the given value.
§Errors
If the given value is out of bounds for has_only_data.
Sourcepub fn is_end_of_section(&self) -> <bool as Specifier>::InOut
pub fn is_end_of_section(&self) -> <bool as Specifier>::InOut
Returns the value of is_end_of_section.
Sourcepub fn is_end_of_section_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn is_end_of_section_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of is_end_of_section.
§Errors
If the returned value contains an invalid bit pattern for is_end_of_section.
Sourcepub fn with_is_end_of_section(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_is_end_of_section(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of is_end_of_section set to the given value.
§Panics
If the given value is out of bounds for is_end_of_section.
Sourcepub fn with_is_end_of_section_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_is_end_of_section_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of is_end_of_section set to the given value.
§Errors
If the given value is out of bounds for is_end_of_section.
Sourcepub fn set_is_end_of_section(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_is_end_of_section(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of is_end_of_section to the given value.
§Panics
If the given value is out of bounds for is_end_of_section.
Sourcepub fn set_is_end_of_section_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_is_end_of_section_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of is_end_of_section to the given value.
§Errors
If the given value is out of bounds for is_end_of_section.
Sourcepub fn is_end_of_context(&self) -> <bool as Specifier>::InOut
pub fn is_end_of_context(&self) -> <bool as Specifier>::InOut
Returns the value of is_end_of_context.
Sourcepub fn is_end_of_context_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn is_end_of_context_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of is_end_of_context.
§Errors
If the returned value contains an invalid bit pattern for is_end_of_context.
Sourcepub fn with_is_end_of_context(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_is_end_of_context(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of is_end_of_context set to the given value.
§Panics
If the given value is out of bounds for is_end_of_context.
Sourcepub fn with_is_end_of_context_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_is_end_of_context_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of is_end_of_context set to the given value.
§Errors
If the given value is out of bounds for is_end_of_context.
Sourcepub fn set_is_end_of_context(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_is_end_of_context(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of is_end_of_context to the given value.
§Panics
If the given value is out of bounds for is_end_of_context.
Sourcepub fn set_is_end_of_context_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_is_end_of_context_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of is_end_of_context to the given value.
§Errors
If the given value is out of bounds for is_end_of_context.
Sourcepub fn has_lifetime(&self) -> <bool as Specifier>::InOut
pub fn has_lifetime(&self) -> <bool as Specifier>::InOut
Returns the value of has_lifetime.
Sourcepub fn has_lifetime_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn has_lifetime_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of has_lifetime.
§Errors
If the returned value contains an invalid bit pattern for has_lifetime.
Sourcepub fn with_has_lifetime(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_has_lifetime(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of has_lifetime set to the given value.
§Panics
If the given value is out of bounds for has_lifetime.
Sourcepub fn with_has_lifetime_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_has_lifetime_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of has_lifetime set to the given value.
§Errors
If the given value is out of bounds for has_lifetime.
Sourcepub fn set_has_lifetime(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_has_lifetime(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of has_lifetime to the given value.
§Panics
If the given value is out of bounds for has_lifetime.
Sourcepub fn set_has_lifetime_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_has_lifetime_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of has_lifetime to the given value.
§Errors
If the given value is out of bounds for has_lifetime.
Sourcepub fn has_represented_by(&self) -> <bool as Specifier>::InOut
pub fn has_represented_by(&self) -> <bool as Specifier>::InOut
Returns the value of has_represented_by.
Sourcepub fn has_represented_by_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn has_represented_by_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of has_represented_by.
§Errors
If the returned value contains an invalid bit pattern for has_represented_by.
Sourcepub fn with_has_represented_by(
self,
new_val: <bool as Specifier>::InOut,
) -> Self
pub fn with_has_represented_by( self, new_val: <bool as Specifier>::InOut, ) -> Self
Returns a copy of the bitfield with the value of has_represented_by set to the given value.
§Panics
If the given value is out of bounds for has_represented_by.
Sourcepub fn with_has_represented_by_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_has_represented_by_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of has_represented_by set to the given value.
§Errors
If the given value is out of bounds for has_represented_by.
Sourcepub fn set_has_represented_by(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_has_represented_by(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of has_represented_by to the given value.
§Panics
If the given value is out of bounds for has_represented_by.
Sourcepub fn set_has_represented_by_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_has_represented_by_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of has_represented_by to the given value.
§Errors
If the given value is out of bounds for has_represented_by.
Sourcepub fn has_iv_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn has_iv_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of has_iv.
§Errors
If the returned value contains an invalid bit pattern for has_iv.
Sourcepub fn with_has_iv(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_has_iv(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of has_iv set to the given value.
§Panics
If the given value is out of bounds for has_iv.
Sourcepub fn with_has_iv_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_has_iv_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of has_iv set to the given value.
§Errors
If the given value is out of bounds for has_iv.
Sourcepub fn set_has_iv(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_has_iv(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of has_iv to the given value.
§Panics
If the given value is out of bounds for has_iv.
Sourcepub fn set_has_iv_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_has_iv_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of has_iv to the given value.
§Errors
If the given value is out of bounds for has_iv.
Sourcepub fn is_compressed(&self) -> <bool as Specifier>::InOut
pub fn is_compressed(&self) -> <bool as Specifier>::InOut
Returns the value of is_compressed.
Sourcepub fn is_compressed_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn is_compressed_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of is_compressed.
§Errors
If the returned value contains an invalid bit pattern for is_compressed.
Sourcepub fn with_is_compressed(self, new_val: <bool as Specifier>::InOut) -> Self
pub fn with_is_compressed(self, new_val: <bool as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of is_compressed set to the given value.
§Panics
If the given value is out of bounds for is_compressed.
Sourcepub fn with_is_compressed_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_is_compressed_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of is_compressed set to the given value.
§Errors
If the given value is out of bounds for is_compressed.
Sourcepub fn set_is_compressed(&mut self, new_val: <bool as Specifier>::InOut)
pub fn set_is_compressed(&mut self, new_val: <bool as Specifier>::InOut)
Sets the value of is_compressed to the given value.
§Panics
If the given value is out of bounds for is_compressed.
Sourcepub fn set_is_compressed_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_is_compressed_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of is_compressed to the given value.
§Errors
If the given value is out of bounds for is_compressed.
Sourcepub fn is_signature_in_last_subblock(&self) -> <bool as Specifier>::InOut
pub fn is_signature_in_last_subblock(&self) -> <bool as Specifier>::InOut
Returns the value of is_signature_in_last_subblock.
Sourcepub fn is_signature_in_last_subblock_or_err(
&self,
) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
pub fn is_signature_in_last_subblock_or_err( &self, ) -> Result<<bool as Specifier>::InOut, InvalidBitPattern<<bool as Specifier>::Bytes>>
Returns the value of is_signature_in_last_subblock.
§Errors
If the returned value contains an invalid bit pattern for is_signature_in_last_subblock.
Sourcepub fn with_is_signature_in_last_subblock(
self,
new_val: <bool as Specifier>::InOut,
) -> Self
pub fn with_is_signature_in_last_subblock( self, new_val: <bool as Specifier>::InOut, ) -> Self
Returns a copy of the bitfield with the value of is_signature_in_last_subblock set to the given value.
§Panics
If the given value is out of bounds for is_signature_in_last_subblock.
Sourcepub fn with_is_signature_in_last_subblock_checked(
self,
new_val: <bool as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_is_signature_in_last_subblock_checked( self, new_val: <bool as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of is_signature_in_last_subblock set to the given value.
§Errors
If the given value is out of bounds for is_signature_in_last_subblock.
Sourcepub fn set_is_signature_in_last_subblock(
&mut self,
new_val: <bool as Specifier>::InOut,
)
pub fn set_is_signature_in_last_subblock( &mut self, new_val: <bool as Specifier>::InOut, )
Sets the value of is_signature_in_last_subblock to the given value.
§Panics
If the given value is out of bounds for is_signature_in_last_subblock.
Sourcepub fn set_is_signature_in_last_subblock_checked(
&mut self,
new_val: <bool as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_is_signature_in_last_subblock_checked( &mut self, new_val: <bool as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of is_signature_in_last_subblock to the given value.
§Errors
If the given value is out of bounds for is_signature_in_last_subblock.
Sourcepub fn creation_timestamp(&self) -> <B43 as Specifier>::InOut
pub fn creation_timestamp(&self) -> <B43 as Specifier>::InOut
Returns the value of creation_timestamp.
Sourcepub fn creation_timestamp_or_err(
&self,
) -> Result<<B43 as Specifier>::InOut, InvalidBitPattern<<B43 as Specifier>::Bytes>>
pub fn creation_timestamp_or_err( &self, ) -> Result<<B43 as Specifier>::InOut, InvalidBitPattern<<B43 as Specifier>::Bytes>>
Returns the value of creation_timestamp.
§Errors
If the returned value contains an invalid bit pattern for creation_timestamp.
Sourcepub fn with_creation_timestamp(self, new_val: <B43 as Specifier>::InOut) -> Self
pub fn with_creation_timestamp(self, new_val: <B43 as Specifier>::InOut) -> Self
Returns a copy of the bitfield with the value of creation_timestamp set to the given value.
§Panics
If the given value is out of bounds for creation_timestamp.
Sourcepub fn with_creation_timestamp_checked(
self,
new_val: <B43 as Specifier>::InOut,
) -> Result<Self, OutOfBounds>
pub fn with_creation_timestamp_checked( self, new_val: <B43 as Specifier>::InOut, ) -> Result<Self, OutOfBounds>
Returns a copy of the bitfield with the value of creation_timestamp set to the given value.
§Errors
If the given value is out of bounds for creation_timestamp.
Sourcepub fn set_creation_timestamp(&mut self, new_val: <B43 as Specifier>::InOut)
pub fn set_creation_timestamp(&mut self, new_val: <B43 as Specifier>::InOut)
Sets the value of creation_timestamp to the given value.
§Panics
If the given value is out of bounds for creation_timestamp.
Sourcepub fn set_creation_timestamp_checked(
&mut self,
new_val: <B43 as Specifier>::InOut,
) -> Result<(), OutOfBounds>
pub fn set_creation_timestamp_checked( &mut self, new_val: <B43 as Specifier>::InOut, ) -> Result<(), OutOfBounds>
Sets the value of creation_timestamp to the given value.
§Errors
If the given value is out of bounds for creation_timestamp.
Trait Implementations§
Source§impl BinRead for FlagsAndTimestamp
impl BinRead for FlagsAndTimestamp
Source§fn read_options<R: Read + Seek>(
__binrw_generated_var_reader: &mut R,
__binrw_generated_var_endian: Endian,
__binrw_generated_var_arguments: Self::Args<'_>,
) -> BinResult<Self>
fn read_options<R: Read + Seek>( __binrw_generated_var_reader: &mut R, __binrw_generated_var_endian: Endian, __binrw_generated_var_arguments: Self::Args<'_>, ) -> BinResult<Self>
Source§fn read<R>(reader: &mut R) -> Result<Self, Error>
fn read<R>(reader: &mut R) -> Result<Self, Error>
Self from the reader using default arguments. Read moreSource§fn read_be<R>(reader: &mut R) -> Result<Self, Error>
fn read_be<R>(reader: &mut R) -> Result<Self, Error>
Self from the reader using default arguments and assuming
big-endian byte order. Read moreSource§fn read_le<R>(reader: &mut R) -> Result<Self, Error>
fn read_le<R>(reader: &mut R) -> Result<Self, Error>
Self from the reader using default arguments and assuming
little-endian byte order. Read moreSource§fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
T from the reader assuming native-endian byte order. Read moreSource§fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Self from the reader using the given arguments. Read moreSource§fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Self from the reader, assuming big-endian byte order, using the
given arguments. Read moreSource§impl BinWrite for FlagsAndTimestamp
impl BinWrite for FlagsAndTimestamp
Source§fn write_options<W: Write + Seek>(
&self,
__binrw_generated_var_writer: &mut W,
__binrw_generated_var_endian: Endian,
__binrw_generated_var_arguments: Self::Args<'_>,
) -> BinResult<()>
fn write_options<W: Write + Seek>( &self, __binrw_generated_var_writer: &mut W, __binrw_generated_var_endian: Endian, __binrw_generated_var_arguments: Self::Args<'_>, ) -> BinResult<()>
Source§fn write<W>(&self, writer: &mut W) -> Result<(), Error>
fn write<W>(&self, writer: &mut W) -> Result<(), Error>
Self to the writer using default arguments. Read moreSource§fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_be<W>(&self, writer: &mut W) -> Result<(), Error>
Self to the writer assuming big-endian byte order. Read moreSource§fn write_le<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_le<W>(&self, writer: &mut W) -> Result<(), Error>
Self to the writer assuming little-endian byte order. Read moreSource§fn write_ne<W>(&self, writer: &mut W) -> Result<(), Error>
fn write_ne<W>(&self, writer: &mut W) -> Result<(), Error>
Self to the writer assuming native-endian byte order. Read moreSource§fn write_args<W>(
&self,
writer: &mut W,
args: Self::Args<'_>,
) -> Result<(), Error>
fn write_args<W>( &self, writer: &mut W, args: Self::Args<'_>, ) -> Result<(), Error>
Self to the writer using the given arguments. Read moreSource§fn write_be_args<W>(
&self,
writer: &mut W,
args: Self::Args<'_>,
) -> Result<(), Error>
fn write_be_args<W>( &self, writer: &mut W, args: Self::Args<'_>, ) -> Result<(), Error>
Self to the writer, assuming big-endian byte order, using the
given arguments. Read moreSource§impl Clone for FlagsAndTimestamp
impl Clone for FlagsAndTimestamp
Source§fn clone(&self) -> FlagsAndTimestamp
fn clone(&self) -> FlagsAndTimestamp
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FlagsAndTimestamp
impl Debug for FlagsAndTimestamp
Source§impl Default for FlagsAndTimestamp
impl Default for FlagsAndTimestamp
Source§impl PartialEq for FlagsAndTimestamp
impl PartialEq for FlagsAndTimestamp
Source§impl ReadEndian for FlagsAndTimestamp
impl ReadEndian for FlagsAndTimestamp
Source§const ENDIAN: EndianKind
const ENDIAN: EndianKind
Source§impl WriteEndian for FlagsAndTimestamp
impl WriteEndian for FlagsAndTimestamp
Source§const ENDIAN: EndianKind
const ENDIAN: EndianKind
impl Copy for FlagsAndTimestamp
impl StructuralPartialEq for FlagsAndTimestamp
Auto Trait Implementations§
impl Freeze for FlagsAndTimestamp
impl RefUnwindSafe for FlagsAndTimestamp
impl Send for FlagsAndTimestamp
impl Sync for FlagsAndTimestamp
impl Unpin for FlagsAndTimestamp
impl UnwindSafe for FlagsAndTimestamp
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi Quirk value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);