Skip to main content

Placement

Enum Placement 

Source
#[repr(u8)]
pub enum Placement { Top = 0, TopStart = 1, TopEnd = 2, Bottom = 3, BottomStart = 4, BottomEnd = 5, Left = 6, LeftStart = 7, LeftEnd = 8, Right = 9, RightStart = 10, RightEnd = 11, }
Expand description

All 12 anchored overlay placements (4 sides × 3 cross-axis alignments).

Variants§

§

Top = 0

§

TopStart = 1

§

TopEnd = 2

§

Bottom = 3

§

BottomStart = 4

§

BottomEnd = 5

§

Left = 6

§

LeftStart = 7

§

LeftEnd = 8

§

Right = 9

§

RightStart = 10

§

RightEnd = 11

Implementations§

Source§

impl OverlayPlacement

Source

pub const COUNT: usize = 12

Source

pub const BITS: u8 = 4

Source

pub const ALL: &'static [OverlayPlacement]

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<OverlayPlacement>

Source

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

Source

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

Source§

impl OverlayPlacement

Source

pub const fn side(self) -> Side

Source

pub const fn alignment(self) -> Alignment

Source

pub const fn from_side_align(side: Side, align: Alignment) -> OverlayPlacement

Source

pub const fn opposite(self) -> OverlayPlacement

Flips the primary side (Bottom -> Top, RightStart -> LeftStart) while keeping alignment.

Source

pub const fn flip_alignment(self) -> OverlayPlacement

Flips cross-axis alignment (Start <-> End) while keeping the primary side.

Trait Implementations§

Source§

impl Clone for OverlayPlacement

Source§

fn clone(&self) -> OverlayPlacement

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 OverlayPlacement

Source§

impl Debug for OverlayPlacement

Source§

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

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

impl Default for OverlayPlacement

Source§

fn default() -> OverlayPlacement

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

impl Display for OverlayPlacement

Source§

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

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

impl Eq for OverlayPlacement

Source§

impl Hash for OverlayPlacement

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 OverlayPlacement

Source§

const OPT_BITS: u8 = 4

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<OverlayPlacement>) -> u32

Source§

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

Source§

impl PartialEq for OverlayPlacement

Source§

fn eq(&self, other: &OverlayPlacement) -> 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 OverlayPlacement

Source§

impl WordValue for OverlayPlacement

Source§

const BITS: u8 = 4

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

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§

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.