Accessor

Trait Accessor 

Source
pub trait Accessor {
    type C: Component;
    type RefT;

    const WRITE: bool;

    // Required method
    unsafe fn ref_from_ptr(
        ptr: *mut <Self::C as Component>::CType,
    ) -> Self::RefT;
}

Required Associated Constants§

Required Associated Types§

Required Methods§

Source

unsafe fn ref_from_ptr(ptr: *mut <Self::C as Component>::CType) -> Self::RefT

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<'a, C: Component> Accessor for Read<'a, C>

Source§

const WRITE: bool = false

Source§

type C = C

Source§

type RefT = &'a <C as Component>::CType

Source§

impl<'a, C: Component> Accessor for Write<'a, C>

Source§

const WRITE: bool = true

Source§

type C = C

Source§

type RefT = &'a mut <C as Component>::CType