[−][src]Struct refloctopus::ShapedLocation
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]
ty: &'db DynamicType<'db>,
fields: FieldsStorage<'fields>,
ptr: *const u8
) -> ShapedLocation<'db, 'data, 'fields>
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]
shape: &'db DataShape<'db>,
fields: FieldsStorage<'z>,
ptr: *const u8
) -> ShapedLocation<'db, 'data, 'z>
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]
pub fn from(v: &'data mut T) -> Self
[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Erasable for T
pub unsafe fn unerase(this: NonNull<Erased>) -> NonNull<T>
pub const ACK_1_1_0: bool
pub fn erase(this: NonNull<Self>) -> NonNull<Erased>
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,