pub trait Storage: Close<State: Retry + Failure> + Sized {
type Layout: Canary;
type Index: Copy;
type Error: Failure<Cleanup = Self::State>;
type Buffer<const GROUP: u16>;
// Required methods
fn new() -> Result<Self, Self::Error>;
fn into_buffer<const GROUP: u16>(self) -> Self::Buffer<GROUP>;
unsafe fn option(&mut self) -> &c_int;
unsafe fn inspect<E>(
&mut self,
index: Self::Index,
len: <<Self::Layout as Receive>::Extent as Extent>::Length,
check: impl FnOnce(&[u8]) -> Result<(), E>,
) -> Result<(), Failure<<Self as Storage>::Index, <<<Self as Storage>::Layout as Receive>::Extent as Extent>::Length, <<<Self as Storage>::Layout as Receive>::Extent as Extent>::Capacity, E>>;
}Expand description
One owner retains canary payloads, registration entries, and their scalar.
Required Associated Types§
type Layout: Canary
type Index: Copy
type Error: Failure<Cleanup = Self::State>
type Buffer<const GROUP: u16>
Required Methods§
fn new() -> Result<Self, Self::Error>
fn into_buffer<const GROUP: u16>(self) -> Self::Buffer<GROUP>
Sourceunsafe fn option(&mut self) -> &c_int
unsafe fn option(&mut self) -> &c_int
§Safety
No kernel operation or other borrower may access the payload scalar.
Sourceunsafe fn inspect<E>(
&mut self,
index: Self::Index,
len: <<Self::Layout as Receive>::Extent as Extent>::Length,
check: impl FnOnce(&[u8]) -> Result<(), E>,
) -> Result<(), Failure<<Self as Storage>::Index, <<<Self as Storage>::Layout as Receive>::Extent as Extent>::Length, <<<Self as Storage>::Layout as Receive>::Extent as Extent>::Capacity, E>>
unsafe fn inspect<E>( &mut self, index: Self::Index, len: <<Self::Layout as Receive>::Extent as Extent>::Length, check: impl FnOnce(&[u8]) -> Result<(), E>, ) -> Result<(), Failure<<Self as Storage>::Index, <<<Self as Storage>::Layout as Receive>::Extent as Extent>::Length, <<<Self as Storage>::Layout as Receive>::Extent as Extent>::Capacity, E>>
§Safety
A unique CQE transfers any valid reported slot; no other access remains.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".