Skip to main content

LayoutWord

Trait LayoutWord 

Source
pub trait LayoutWord: Copy + ZerocopyWord {
    type Index: LayoutIndex;

    // Required method
    fn get(self) -> Self::Index;
}
Expand description

A native-host or little-endian word carrying a typed dense LayoutIndex.

This merges what oxgraph-csr and oxgraph-hyper-bcsr previously duplicated as CsrWord/BcsrWord. The associated LayoutWord::Index recovers the logical index value from either a native word (identity) or a little-endian storage word (byte-order conversion), so a single IdSlice drives both build-path and view-path iteration.

§Performance

LayoutWord::get is expected to be O(1).

Required Associated Types§

Source

type Index: LayoutIndex

Logical dense index recovered from this word.

Required Methods§

Source

fn get(self) -> Self::Index

Reads the logical index value out of this word.

§Performance

This method is O(1).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl LayoutWord for U16<LE>

Source§

type Index = u16

Source§

fn get(self) -> Self::Index

Source§

impl LayoutWord for U32<LE>

Source§

type Index = u32

Source§

fn get(self) -> Self::Index

Source§

impl LayoutWord for U64<LE>

Source§

type Index = u64

Source§

fn get(self) -> Self::Index

Source§

impl LayoutWord for u16

Source§

type Index = u16

Source§

fn get(self) -> Self::Index

Source§

impl LayoutWord for u32

Source§

type Index = u32

Source§

fn get(self) -> Self::Index

Source§

impl LayoutWord for u64

Source§

type Index = u64

Source§

fn get(self) -> Self::Index

Source§

impl LayoutWord for usize

Source§

type Index = usize

Source§

fn get(self) -> Self::Index

Implementors§