#[repr(u8)]pub enum Side {
Top = 0,
Bottom = 1,
Left = 2,
Right = 3,
}Expand description
Primary side relative to an anchor rectangle.
Variants§
Implementations§
Source§impl Side
impl Side
pub const COUNT: usize = 4
pub const BITS: u8 = 2
pub const ALL: &'static [Side]
Sourcepub const VALUE_SET: ValueSetDesc
pub const VALUE_SET: ValueSetDesc
Named variants mirrored to hosts as NV_<TYPE>_<VARIANT>.
pub const fn to_word(self) -> u32
pub const fn try_from_word(__nv_bits: u32) -> Option<Side>
pub const fn from_word(__nv_bits: u32) -> Side
pub const fn opt_to_word(__nv_v: Option<Side>) -> u32
Trait Implementations§
impl Copy for Side
impl Eq for Side
Source§impl OptWord for Side
impl OptWord for Side
const OPT_BITS: u8 = 3
const OPT_KIND: FieldKind = ::nativeview_store::__private::FieldKind::Enum
const OPT_ENCODING: OptEncoding = ::nativeview_store::__private::OptEncoding::PlusOne
Source§const VALUES: Option<&'static ValueSetDesc>
const VALUES: Option<&'static ValueSetDesc>
Named values of the inner type (see
WordValue::VALUES).fn opt_to_bits(__nv_v: Option<Side>) -> u32
fn opt_from_bits(__nv_bits: u32) -> Option<Side>
impl StructuralPartialEq for Side
Source§impl WordValue for Side
impl WordValue for Side
const BITS: u8 = 2
const KIND: FieldKind = ::nativeview_store::__private::FieldKind::Enum
Source§const VALUES: Option<&'static ValueSetDesc>
const VALUES: Option<&'static ValueSetDesc>
Named values (
WordEnum variants, word_flags! bits), mirrored to hosts as
NV_<TYPE>_<VALUE> by codegen so foreign code never hand-copies them.fn to_bits(self) -> u32
fn from_bits(__nv_bits: u32) -> Side
Source§const OPT_ENCODING: OptEncoding = OptEncoding::Required
const OPT_ENCODING: OptEncoding = OptEncoding::Required
Optionality & bit-encoding discriminator hashed into
TableDesc::schema_hash.Source§fn to_masked_bits(self, _bit_width: u32) -> u32
fn to_masked_bits(self, _bit_width: u32) -> u32
Source§fn from_masked_bits(bits: u32, _bit_width: u32) -> Self
fn from_masked_bits(bits: u32, _bit_width: u32) -> Self
Decodes
bits from a field of bit_width (1..=32) bits (sign-extending narrowed signed
integers).Auto Trait Implementations§
impl Forget for Side
impl Freeze for Side
impl Move for Side
impl RefUnwindSafe for Side
impl Send for Side
impl Sync for Side
impl Unpin for Side
impl UnsafeUnpin for Side
impl UnwindSafe for Side
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ScalarField for Twhere
T: WordValue,
impl<T> ScalarField for Twhere
T: WordValue,
fn read_row( row: &[u32], word: usize, shift: u32, mask: u32, _val_word: usize, ) -> T
fn write_row( self, writer: &mut RowWriter<'_>, word: usize, shift: u32, mask: u32, _val_word: usize, )
Source§fn encode_patch_ops(
self,
word: usize,
shift: u32,
mask: u32,
_val_word: usize,
emit: &mut dyn FnMut(usize, u32, u32),
)
fn encode_patch_ops( self, word: usize, shift: u32, mask: u32, _val_word: usize, emit: &mut dyn FnMut(usize, u32, u32), )
Emits
(word_idx, clear_mask, set_bits) masked patch operations for crate::RowPatch.fn read_ref( row: RowRef<'_>, word: usize, shift: u32, mask: u32, val_word: usize, ) -> Self
Source§impl<T> TableField for Twhere
T: WordValue,
impl<T> TableField for Twhere
T: WordValue,
const KIND: FieldKind = T::KIND
Source§const OPT_ENCODING: OptEncoding = T::OPT_ENCODING
const OPT_ENCODING: OptEncoding = T::OPT_ENCODING
Optionality & bit-encoding discriminator hashed into
TableDesc::schema_hash.Source§const BITS: u8 = T::BITS
const BITS: u8 = T::BITS
Bits occupied in its primary word (
1..=32 for scalar, 1 for wide Option<T>, 64 for 64-bit/Str).Source§const PACK_KIND: PackKind = PackKind::Scalar
const PACK_KIND: PackKind = PackKind::Scalar
Word packing layout shape (
Scalar, WideOpt, Wide64, Str, Resource).Source§const VALUES: Option<&'static ValueSetDesc> = T::VALUES
const VALUES: Option<&'static ValueSetDesc> = T::VALUES
Named values the field holds (see
WordValue::VALUES).