[][src]Struct refloctopus::ShapedLocation

pub struct ShapedLocation<'db, 'data, 'fields> { /* fields omitted */ }

A location in memory with a known reflected type.

These can be used with Db::serialize_any.

SAFETY: the type must always match the actual content of the memory! The easiest way to ensure this is to only use the From impls that work on references to any type that implements Reflect to construct locations.

Implementations

impl<'db, 'data, 'fields> ShapedLocation<'db, 'data, 'fields>[src]

pub unsafe fn new(
    ty: &'db DynamicType<'db>,
    fields: FieldsStorage<'fields>,
    ptr: *const u8
) -> ShapedLocation<'db, 'data, 'fields>
[src]

Prepare to deserialize a value of typ into ptr.

Safety

If typ doesn't actually describe the region of memory, laundry will be eaten.

pub unsafe fn from_shape<'z>(
    shape: &'db DataShape<'db>,
    fields: FieldsStorage<'z>,
    ptr: *const u8
) -> ShapedLocation<'db, 'data, 'z>
[src]

Prepare to deserialize a value of typ into ptr.

Safety

If typ doesn't actually describe the region of memory, laundry will be eaten.

Trait Implementations

impl<'a, T: StaticReflect> From<&'a T> for ShapedLocation<'static, 'a, 'a>[src]

impl<'db, 'data, T: StaticReflect> From<&'data mut T> for ShapedLocation<'db, 'data, 'static>[src]

Auto Trait Implementations

impl<'db, 'data, 'fields> RefUnwindSafe for ShapedLocation<'db, 'data, 'fields>[src]

impl<'db, 'data, 'fields> !Send for ShapedLocation<'db, 'data, 'fields>[src]

impl<'db, 'data, 'fields> !Sync for ShapedLocation<'db, 'data, 'fields>[src]

impl<'db, 'data, 'fields> Unpin for ShapedLocation<'db, 'data, 'fields>[src]

impl<'db, 'data, 'fields> UnwindSafe for ShapedLocation<'db, 'data, 'fields>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Erasable for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.