Trait Instance

Source
pub trait Instance {
    type Buf<P: Ptr>: Clone + Copy;

    // Required methods
    unsafe fn buf<P: Ptr>(ptr: P) -> Self::Buf<P>;
    fn buf_ptr<P: Ptr>(buf: Self::Buf<P>) -> P;
}

Required Associated Types§

Source

type Buf<P: Ptr>: Clone + Copy

Required Methods§

Source

unsafe fn buf<P: Ptr>(ptr: P) -> Self::Buf<P>

Source

fn buf_ptr<P: Ptr>(buf: Self::Buf<P>) -> P

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.

Implementations on Foreign Types§

Source§

impl Instance for bool

Source§

type Buf<P: Ptr> = BoolBuf<P>

Source§

unsafe fn buf<P: Ptr>(ptr: P) -> Self::Buf<P>

Source§

fn buf_ptr<P: Ptr>(buf: Self::Buf<P>) -> P

Source§

impl Instance for char

Source§

type Buf<P: Ptr> = CharBuf<P>

Source§

unsafe fn buf<P: Ptr>(ptr: P) -> Self::Buf<P>

Source§

fn buf_ptr<P: Ptr>(buf: Self::Buf<P>) -> P

Source§

impl Instance for f32

Source§

type Buf<P: Ptr> = F32Buf<P>

Source§

unsafe fn buf<P: Ptr>(ptr: P) -> Self::Buf<P>

Source§

fn buf_ptr<P: Ptr>(buf: Self::Buf<P>) -> P

Source§

impl Instance for f64

Source§

type Buf<P: Ptr> = F64Buf<P>

Source§

unsafe fn buf<P: Ptr>(ptr: P) -> Self::Buf<P>

Source§

fn buf_ptr<P: Ptr>(buf: Self::Buf<P>) -> P

Source§

impl Instance for i8

Source§

type Buf<P: Ptr> = I8Buf<P>

Source§

unsafe fn buf<P: Ptr>(ptr: P) -> Self::Buf<P>

Source§

fn buf_ptr<P: Ptr>(buf: Self::Buf<P>) -> P

Source§

impl Instance for i32

Source§

type Buf<P: Ptr> = I32Buf<P>

Source§

unsafe fn buf<P: Ptr>(ptr: P) -> Self::Buf<P>

Source§

fn buf_ptr<P: Ptr>(buf: Self::Buf<P>) -> P

Source§

impl Instance for i64

Source§

type Buf<P: Ptr> = I64Buf<P>

Source§

unsafe fn buf<P: Ptr>(ptr: P) -> Self::Buf<P>

Source§

fn buf_ptr<P: Ptr>(buf: Self::Buf<P>) -> P

Source§

impl Instance for i128

Source§

type Buf<P: Ptr> = I128Buf<P>

Source§

unsafe fn buf<P: Ptr>(ptr: P) -> Self::Buf<P>

Source§

fn buf_ptr<P: Ptr>(buf: Self::Buf<P>) -> P

Source§

impl Instance for u8

Source§

type Buf<P: Ptr> = U8Buf<P>

Source§

unsafe fn buf<P: Ptr>(ptr: P) -> Self::Buf<P>

Source§

fn buf_ptr<P: Ptr>(buf: Self::Buf<P>) -> P

Source§

impl Instance for u32

Source§

type Buf<P: Ptr> = U32Buf<P>

Source§

unsafe fn buf<P: Ptr>(ptr: P) -> Self::Buf<P>

Source§

fn buf_ptr<P: Ptr>(buf: Self::Buf<P>) -> P

Source§

impl Instance for u64

Source§

type Buf<P: Ptr> = U64Buf<P>

Source§

unsafe fn buf<P: Ptr>(ptr: P) -> Self::Buf<P>

Source§

fn buf_ptr<P: Ptr>(buf: Self::Buf<P>) -> P

Source§

impl Instance for u128

Source§

type Buf<P: Ptr> = U128Buf<P>

Source§

unsafe fn buf<P: Ptr>(ptr: P) -> Self::Buf<P>

Source§

fn buf_ptr<P: Ptr>(buf: Self::Buf<P>) -> P

Source§

impl Instance for ()

Source§

type Buf<P: Ptr> = UnitBuf<P>

Source§

unsafe fn buf<P: Ptr>(ptr: P) -> Self::Buf<P>

Source§

fn buf_ptr<P: Ptr>(buf: Self::Buf<P>) -> P

Source§

impl Instance for String

Source§

type Buf<P: Ptr> = StringBuf<P>

Source§

unsafe fn buf<P: Ptr>(ptr: P) -> Self::Buf<P>

Source§

fn buf_ptr<P: Ptr>(buf: Self::Buf<P>) -> P

Source§

impl<'a> Instance for &'a [u8]

Source§

type Buf<P: Ptr> = SliceU8Buf<'a, P>

Source§

unsafe fn buf<P: Ptr>(ptr: P) -> Self::Buf<P>

Source§

fn buf_ptr<P: Ptr>(buf: Self::Buf<P>) -> P

Source§

impl<T> Instance for Option<T>

Source§

type Buf<P: Ptr> = OptionBuf<P, T>

Source§

unsafe fn buf<P: Ptr>(ptr: P) -> Self::Buf<P>

Source§

fn buf_ptr<P: Ptr>(buf: Self::Buf<P>) -> P

Source§

impl<T> Instance for PhantomData<T>

Source§

type Buf<P: Ptr> = PhantomDataBuf<P, T>

Source§

unsafe fn buf<P: Ptr>(ptr: P) -> Self::Buf<P>

Source§

fn buf_ptr<P: Ptr>(buf: Self::Buf<P>) -> P

Source§

impl<T: Fixed, const N: usize> Instance for [T; N]

Source§

type Buf<P: Ptr> = ArrayBuf<P, T, N>

Source§

unsafe fn buf<P: Ptr>(ptr: P) -> Self::Buf<P>

Source§

fn buf_ptr<P: Ptr>(buf: Self::Buf<P>) -> P

Implementors§

Source§

impl Instance for Const

Source§

impl Instance for Mut

Source§

impl<const LEN: usize, T: Base> Instance for Value<LEN, T>

Source§

type Buf<P: Ptr> = Buf<P, LEN, T>