Skip to main content

SharedDevicePrefix

Trait SharedDevicePrefix 

Source
pub trait SharedDevicePrefix:
    Send
    + Sync
    + Debug {
    // Required methods
    fn device_ptr(&self) -> u64;
    fn committed_physical_bytes(&self) -> u64;
    fn mapped_bytes(&self) -> usize;
    fn requested_bytes(&self) -> usize;
    fn as_any(&self) -> &dyn Any;
}
Expand description

A pinned, read-only shared prefix whose physical bytes are owned once and may be mapped into multiple allocations.

Required Methods§

Source

fn device_ptr(&self) -> u64

Source

fn committed_physical_bytes(&self) -> u64

Source

fn mapped_bytes(&self) -> usize

Source

fn requested_bytes(&self) -> usize

Source

fn as_any(&self) -> &dyn Any

Concrete-prefix recovery for the mapping implementation that created this opaque handle.

This is not an allocator/capability identity proof. Capability coherence is the trusted contract documented on DeviceAllocator.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§