pub struct CascadeBackend { /* private fields */ }Implementations§
Source§impl CascadeBackend
impl CascadeBackend
pub fn new( backing: Box<dyn StorageBackend>, layout: GroupLayout, cap_slots: u32, ) -> Result<Self>
Trait Implementations§
Source§impl Drop for CascadeBackend
impl Drop for CascadeBackend
Source§impl StorageBackend for CascadeBackend
impl StorageBackend for CascadeBackend
Source§fn write_from_host(&mut self, key: GroupKey, src: &[u8]) -> Result<()>
fn write_from_host(&mut self, key: GroupKey, src: &[u8]) -> Result<()>
2026-09-25: Write one group from host memory;
src is group_bytes()
long.Source§fn read(&mut self, requests: &[ReadRequest], stream: u64) -> Result<()>
fn read(&mut self, requests: &[ReadRequest], stream: u64) -> Result<()>
2026-09-25: Fill every request’s destination. Returns once the data is
in place, so work the caller enqueues on
stream afterwards reads it.Source§fn read_async(&mut self, requests: &[ReadRequest], stream: u64) -> Result<()>
fn read_async(&mut self, requests: &[ReadRequest], stream: u64) -> Result<()>
2026-09-25: Like
read, but an implementation may return before the
copies on stream finish. The default calls read.Source§fn register_landing_region(&mut self, base: u64, len: usize) -> Result<()>
fn register_landing_region(&mut self, base: u64, len: usize) -> Result<()>
2026-09-25: Register
[base, base + len) as the region reads land in.
The RDMA backends register it as one memory region per rail; the default
does nothing.Source§fn group_layout(&self) -> GroupLayout
fn group_layout(&self) -> GroupLayout
2026-09-25: The geometry the default block methods fan out with.
Source§fn read_blocks(
&mut self,
requests: &[BlockReadRequest],
stream: u64,
) -> Result<()>
fn read_blocks( &mut self, requests: &[BlockReadRequest], stream: u64, ) -> Result<()>
2026-09-25: Read whole blocks, with the stream contract of
read. The
default fans out to read through expand_blocks_to_groups.Source§fn read_blocks_async(
&mut self,
requests: &[BlockReadRequest],
stream: u64,
) -> Result<()>
fn read_blocks_async( &mut self, requests: &[BlockReadRequest], stream: u64, ) -> Result<()>
2026-09-25: The block form of
read_async. The default fans out to
read_async.Source§fn write_block_from_host(
&mut self,
base_key: GroupKey,
src: &[u8],
) -> Result<()>
fn write_block_from_host( &mut self, base_key: GroupKey, src: &[u8], ) -> Result<()>
2026-09-25: Write one whole block.
src is block_bytes() laid out
[K0, …, K(nkv-1), V0, …, V(nkv-1)] at group_stride pitch; only
base_key’s layer and block are read. The default rejects any other
length, then calls write_from_host for K(kh) and V(kh) of each head.Source§fn write_blocks_run(
&mut self,
base_key: GroupKey,
run_len: usize,
src: &[u8],
) -> Result<()>
fn write_blocks_run( &mut self, base_key: GroupKey, run_len: usize, src: &[u8], ) -> Result<()>
2026-09-25: Write
run_len consecutive blocks of one layer, starting at
base_key’s block; src is run_len · block_bytes(). The default
rejects any other length, then calls write_block_from_host once per
block.Source§fn supports_write_run_coalescing(&self) -> bool
fn supports_write_run_coalescing(&self) -> bool
2026-09-25: Whether this backend serves
write_blocks_run as one wide
op. The default is false.impl Sync for CascadeBackend
Auto Trait Implementations§
impl Freeze for CascadeBackend
impl !RefUnwindSafe for CascadeBackend
impl Send for CascadeBackend
impl Unpin for CascadeBackend
impl !UnwindSafe for CascadeBackend
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