pub unsafe trait Slots: Slots {
type Layout: Copy + Into<(Self::Capacity, Self::Capacity)>;
type Owned: Copy + Into<Self::Physical>;
type Accepted: TryFrom<(Self::Index, Self::Capacity)>;
type Missing: Copy + Eq;
// Required methods
fn excludes(
capacity: Self::Capacity,
index: Self::Index,
) -> Option<Self::Missing>;
fn backing(index: Self::Index) -> Self::Missing;
fn vacant(index: Self::Index) -> Self::Missing;
fn replaced(
index: Self::Index,
expected: RawFd,
actual: RawFd,
) -> Self::Missing;
}Expand description
§Safety
Layout yields (capacity, accepted_prefix); the prefix fits capacity. Owned conversion preserves identity.
Accepted conversion succeeds only in its prefix and stays affine; excludes reports indices outside capacity.
Required Associated Types§
type Layout: Copy + Into<(Self::Capacity, Self::Capacity)>
type Owned: Copy + Into<Self::Physical>
type Accepted: TryFrom<(Self::Index, Self::Capacity)>
type Missing: Copy + Eq
Required Methods§
fn excludes( capacity: Self::Capacity, index: Self::Index, ) -> Option<Self::Missing>
fn backing(index: Self::Index) -> Self::Missing
fn vacant(index: Self::Index) -> Self::Missing
fn replaced(index: Self::Index, expected: RawFd, actual: RawFd) -> Self::Missing
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".