pub struct ArchivedBox<T: ArchivePointee + ?Sized>(/* private fields */);
Implementations§
Source§impl<T: ArchivePointee + ?Sized> ArchivedBox<T>
impl<T: ArchivePointee + ?Sized> ArchivedBox<T>
Sourcepub fn get_pin_mut(self: Pin<&mut Self>) -> Pin<&mut T>
pub fn get_pin_mut(self: Pin<&mut Self>) -> Pin<&mut T>
Returns a pinned mutable reference to the value of this archived box
Sourcepub unsafe fn resolve_from_ref<U: ArchiveUnsized<Archived = T> + ?Sized>(
value: &U,
pos: usize,
resolver: BoxResolver<U::MetadataResolver>,
out: *mut Self,
)
pub unsafe fn resolve_from_ref<U: ArchiveUnsized<Archived = T> + ?Sized>( value: &U, pos: usize, resolver: BoxResolver<U::MetadataResolver>, out: *mut Self, )
Resolves an archived box from the given value and parameters.
§Safety
pos
must be the position ofout
within the archiveresolver
must be the result of serializingvalue
Sourcepub fn serialize_from_ref<U, S>(
value: &U,
serializer: &mut S,
) -> Result<BoxResolver<U::MetadataResolver>, S::Error>
pub fn serialize_from_ref<U, S>( value: &U, serializer: &mut S, ) -> Result<BoxResolver<U::MetadataResolver>, S::Error>
Serializes an archived box from the given value and serializer.
Source§impl<T> ArchivedBox<[T]>
impl<T> ArchivedBox<[T]>
Sourcepub unsafe fn serialize_copy_from_slice<U, S>(
slice: &[U],
serializer: &mut S,
) -> Result<BoxResolver<MetadataResolver<[U]>>, S::Error>
pub unsafe fn serialize_copy_from_slice<U, S>( slice: &[U], serializer: &mut S, ) -> Result<BoxResolver<MetadataResolver<[U]>>, S::Error>
Serializes an archived Box
from a given slice by directly copying bytes.
§Safety
The type being serialized must be copy-safe. Copy-safe types must be trivially copyable (have the same archived and unarchived representations) and contain no padding bytes. In situations where copying uninitialized bytes the output is acceptable, this function may be used with types that contain padding bytes.
Trait Implementations§
Source§impl<T: ArchivePointee + ?Sized> AsRef<T> for ArchivedBox<T>
impl<T: ArchivePointee + ?Sized> AsRef<T> for ArchivedBox<T>
Source§impl<T: ArchivePointee + ?Sized> Borrow<T> for ArchivedBox<T>
impl<T: ArchivePointee + ?Sized> Borrow<T> for ArchivedBox<T>
Source§impl<T, C> CheckBytes<C> for ArchivedBox<T>where
T: ArchivePointee + CheckBytes<C> + LayoutRaw + Pointee + ?Sized,
C: ArchiveContext + ?Sized,
T::ArchivedMetadata: CheckBytes<C>,
C::Error: Error,
impl<T, C> CheckBytes<C> for ArchivedBox<T>where
T: ArchivePointee + CheckBytes<C> + LayoutRaw + Pointee + ?Sized,
C: ArchiveContext + ?Sized,
T::ArchivedMetadata: CheckBytes<C>,
C::Error: Error,
Source§type Error = OwnedPointerError<<<T as ArchivePointee>::ArchivedMetadata as CheckBytes<C>>::Error, <T as CheckBytes<C>>::Error, <C as Fallible>::Error>
type Error = OwnedPointerError<<<T as ArchivePointee>::ArchivedMetadata as CheckBytes<C>>::Error, <T as CheckBytes<C>>::Error, <C as Fallible>::Error>
The error that may result from checking the type.
Source§impl<T: ArchivePointee + ?Sized> Debug for ArchivedBox<T>where
T::ArchivedMetadata: Debug,
impl<T: ArchivePointee + ?Sized> Debug for ArchivedBox<T>where
T::ArchivedMetadata: Debug,
Source§impl<T: ArchivePointee + ?Sized> Deref for ArchivedBox<T>
impl<T: ArchivePointee + ?Sized> Deref for ArchivedBox<T>
Source§impl<T, D> Deserialize<Box<T>, D> for ArchivedBox<T::Archived>
impl<T, D> Deserialize<Box<T>, D> for ArchivedBox<T::Archived>
Source§impl<F: Archive, D: Fallible + ?Sized> DeserializeWith<ArchivedBox<<F as Archive>::Archived>, F, D> for AsBoxwhere
F::Archived: Deserialize<F, D>,
impl<F: Archive, D: Fallible + ?Sized> DeserializeWith<ArchivedBox<<F as Archive>::Archived>, F, D> for AsBoxwhere
F::Archived: Deserialize<F, D>,
Source§fn deserialize_with(
field: &ArchivedBox<F::Archived>,
deserializer: &mut D,
) -> Result<F, D::Error>
fn deserialize_with( field: &ArchivedBox<F::Archived>, deserializer: &mut D, ) -> Result<F, D::Error>
Deserializes the field type
F
using the given deserializer.Source§impl<T, D> DeserializeWith<ArchivedBox<[<T as Archive>::Archived]>, Box<[T]>, D> for CopyOptimize
impl<T, D> DeserializeWith<ArchivedBox<[<T as Archive>::Archived]>, Box<[T]>, D> for CopyOptimize
Source§fn deserialize_with(
field: &ArchivedBox<[T::Archived]>,
_: &mut D,
) -> Result<Box<[T]>, D::Error>
fn deserialize_with( field: &ArchivedBox<[T::Archived]>, _: &mut D, ) -> Result<Box<[T]>, D::Error>
Deserializes the field type
F
using the given deserializer.Source§impl<T: ArchivePointee + Display + ?Sized> Display for ArchivedBox<T>
impl<T: ArchivePointee + Display + ?Sized> Display for ArchivedBox<T>
Source§impl<T: ArchivePointee + Hash + ?Sized> Hash for ArchivedBox<T>
impl<T: ArchivePointee + Hash + ?Sized> Hash for ArchivedBox<T>
Source§impl<T: ArchivePointee + Ord + ?Sized> Ord for ArchivedBox<T>
impl<T: ArchivePointee + Ord + ?Sized> Ord for ArchivedBox<T>
Source§impl<T: ArchivePointee + PartialEq<U> + ?Sized, U: ArchivePointee + ?Sized> PartialEq<ArchivedBox<U>> for ArchivedBox<T>
impl<T: ArchivePointee + PartialEq<U> + ?Sized, U: ArchivePointee + ?Sized> PartialEq<ArchivedBox<U>> for ArchivedBox<T>
Source§impl<T: ArchivePointee + PartialEq<U> + ?Sized, U: ?Sized> PartialEq<Box<U>> for ArchivedBox<T>
impl<T: ArchivePointee + PartialEq<U> + ?Sized, U: ?Sized> PartialEq<Box<U>> for ArchivedBox<T>
Source§impl<T: ArchivePointee + PartialOrd<U> + ?Sized, U: ?Sized> PartialOrd<Box<U>> for ArchivedBox<T>
impl<T: ArchivePointee + PartialOrd<U> + ?Sized, U: ?Sized> PartialOrd<Box<U>> for ArchivedBox<T>
Source§impl<T: ArchivePointee + PartialOrd + ?Sized> PartialOrd for ArchivedBox<T>
impl<T: ArchivePointee + PartialOrd + ?Sized> PartialOrd for ArchivedBox<T>
Source§impl<T: ArchivePointee + ?Sized> Pointer for ArchivedBox<T>
impl<T: ArchivePointee + ?Sized> Pointer for ArchivedBox<T>
impl<T: ArchivePointee + Eq + ?Sized> Eq for ArchivedBox<T>
Auto Trait Implementations§
impl<T> Freeze for ArchivedBox<T>
impl<T> RefUnwindSafe for ArchivedBox<T>
impl<T> Send for ArchivedBox<T>
impl<T> Sync for ArchivedBox<T>
impl<T> !Unpin for ArchivedBox<T>
impl<T> UnwindSafe for ArchivedBox<T>
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CallHasher for T
impl<T> CallHasher for T
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: *const T) -> Layout
fn layout_raw(_: *const T) -> Layout
Gets the layout of the type.