Unbind

Trait Unbind 

Source
pub trait Unbind<I = usize>:
    Send
    + Sync
    + Copy
    + Debug
    + Seal {
    // Required methods
    unsafe fn new_unbound(idx: I) -> Self;
    fn unbound(self) -> I;
}
Expand description

sealed trait for types that can be created from “unbound” values, as long as their struct preconditions are upheld

Required Methods§

Source

unsafe fn new_unbound(idx: I) -> Self

creates new value

§safety

safety invariants must be upheld

Source

fn unbound(self) -> I

returns the unbound value, unconstrained by safety invariants

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Unbind for Dim<'_>

Source§

impl Unbind for One

Source§

impl<I: Index> Unbind<<I as Index>::Signed> for MaybeIdx<'_, I>

Source§

impl<I: Index> Unbind<<I as Index>::Signed> for MaybeIdxOne<I>

Source§

impl<I: Index> Unbind<I> for Idx<'_, I>

Source§

impl<I: Index> Unbind<I> for IdxInc<'_, I>

Source§

impl<I: Index> Unbind<I> for IdxIncOne<I>

Source§

impl<I: Index> Unbind<I> for Zero

Source§

impl<T: Send + Sync + Copy + Debug + Seal> Unbind<T> for T