#[repr(u8)]pub enum ScrollSnapMode {
Inherit = 0,
None = 1,
Page = 2,
FixedExtent = 3,
}Expand description
Per-container snap-point mode override for ScrollPhysics.
Variants§
Inherit = 0
Inherit the surface physics engine’s snap behavior (auto-honoring Scroll::paging).
None = 1
Free scrolling with snapping disabled (overrides both engine snap and Scroll::paging).
Page = 2
Snap to multiples of the container’s viewport extent (PageSnap).
FixedExtent = 3
Snap to multiples of ScrollPhysics::snap_extent (falling back to viewport when <= 0).
Implementations§
Source§impl ScrollSnapMode
impl ScrollSnapMode
pub const COUNT: usize = 4
pub const BITS: u8 = 2
pub const ALL: &'static [Self]
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<Self>
pub const fn from_word(__nv_bits: u32) -> Self
pub const fn opt_to_word(__nv_v: Option<Self>) -> u32
Trait Implementations§
Source§impl Clone for ScrollSnapMode
impl Clone for ScrollSnapMode
impl Copy for ScrollSnapMode
Source§impl Debug for ScrollSnapMode
impl Debug for ScrollSnapMode
Source§impl Default for ScrollSnapMode
impl Default for ScrollSnapMode
impl Eq for ScrollSnapMode
Source§impl Hash for ScrollSnapMode
impl Hash for ScrollSnapMode
Source§impl OptWord for ScrollSnapMode
impl OptWord for ScrollSnapMode
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<Self>) -> u32
fn opt_from_bits(__nv_bits: u32) -> Option<Self>
Source§impl PartialEq for ScrollSnapMode
impl PartialEq for ScrollSnapMode
impl StructuralPartialEq for ScrollSnapMode
Source§impl WordValue for ScrollSnapMode
impl WordValue for ScrollSnapMode
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) -> Self
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 ScrollSnapMode
impl Freeze for ScrollSnapMode
impl Move for ScrollSnapMode
impl RefUnwindSafe for ScrollSnapMode
impl Send for ScrollSnapMode
impl Sync for ScrollSnapMode
impl Unpin for ScrollSnapMode
impl UnsafeUnpin for ScrollSnapMode
impl UnwindSafe for ScrollSnapMode
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).