Skip to main content

Side

Enum Side 

Source
#[repr(u8)]
pub enum Side { Top = 0, Bottom = 1, Left = 2, Right = 3, }
Expand description

Primary side relative to an anchor rectangle.

Variants§

§

Top = 0

§

Bottom = 1

§

Left = 2

§

Right = 3

Implementations§

Source§

impl Side

Source

pub const COUNT: usize = 4

Source

pub const BITS: u8 = 2

Source

pub const ALL: &'static [Side]

Source

pub const VALUE_SET: ValueSetDesc

Named variants mirrored to hosts as NV_<TYPE>_<VARIANT>.

Source

pub const fn to_word(self) -> u32

Source

pub const fn try_from_word(__nv_bits: u32) -> Option<Side>

Source

pub const fn from_word(__nv_bits: u32) -> Side

Source

pub const fn opt_to_word(__nv_v: Option<Side>) -> u32

Source§

impl Side

Source

pub const fn opposite(self) -> Side

Source

pub const fn is_vertical(self) -> bool

Trait Implementations§

Source§

impl Clone for Side

Source§

fn clone(&self) -> Side

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Side

Source§

impl Debug for Side

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for Side

Source§

fn default() -> Side

Returns the “default value” for a type. Read more
Source§

impl Eq for Side

Source§

impl Hash for Side

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl OptWord for Side

Source§

const OPT_BITS: u8 = 3

Source§

const OPT_KIND: FieldKind = ::nativeview_store::__private::FieldKind::Enum

Source§

const OPT_ENCODING: OptEncoding = ::nativeview_store::__private::OptEncoding::PlusOne

Source§

const VALUES: Option<&'static ValueSetDesc>

Named values of the inner type (see WordValue::VALUES).
Source§

fn opt_to_bits(__nv_v: Option<Side>) -> u32

Source§

fn opt_from_bits(__nv_bits: u32) -> Option<Side>

Source§

impl PartialEq for Side

Source§

fn eq(&self, other: &Side) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Side

Source§

impl WordValue for Side

Source§

const BITS: u8 = 2

Source§

const KIND: FieldKind = ::nativeview_store::__private::FieldKind::Enum

Source§

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.
Source§

fn to_bits(self) -> u32

Source§

fn from_bits(__nv_bits: u32) -> Side

Source§

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

Encodes self into a field of bit_width (1..=32) bits. Read more
Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ScalarField for T
where T: WordValue,

Source§

fn read_row( row: &[u32], word: usize, shift: u32, mask: u32, _val_word: usize, ) -> T

Source§

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), )

Emits (word_idx, clear_mask, set_bits) masked patch operations for crate::RowPatch.
Source§

fn read_ref( row: RowRef<'_>, word: usize, shift: u32, mask: u32, val_word: usize, ) -> Self

Source§

impl<T> TableField for T
where T: WordValue,

Source§

const KIND: FieldKind = T::KIND

Source§

const OPT_ENCODING: OptEncoding = T::OPT_ENCODING

Optionality & bit-encoding discriminator hashed into TableDesc::schema_hash.
Source§

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

Word packing layout shape (Scalar, WideOpt, Wide64, Str, Resource).
Source§

const VALUES: Option<&'static ValueSetDesc> = T::VALUES

Named values the field holds (see WordValue::VALUES).
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.