Skip to main content

RealBuffer

Trait RealBuffer 

Source
pub trait RealBuffer: Send + Sync {
    // Required methods
    fn len(&self) -> usize;
    fn location(&self) -> MemoryLocation;
    fn as_any(&self) -> &dyn Any;
    fn as_any_mut(&mut self) -> &mut dyn Any;

    // Provided method
    fn is_empty(&self) -> bool { ... }
}
Expand description

Type-erased contiguous buffer of f64 values owned by a resident backend.

Required Methods§

Source

fn len(&self) -> usize

Returns the number of real elements.

Source

fn location(&self) -> MemoryLocation

Returns the buffer’s memory domain.

Source

fn as_any(&self) -> &dyn Any

Exposes immutable type erasure for backend-specific downcasting.

Source

fn as_any_mut(&mut self) -> &mut dyn Any

Exposes mutable type erasure for backend-specific downcasting.

Provided Methods§

Source

fn is_empty(&self) -> bool

Returns whether the buffer contains no elements.

Implementors§