#[repr(transparent)]struct ArtifactBuildFromArchiveCell {
unsafe_self_cell: UnsafeSelfCell<ArtifactBuildFromArchiveCell, OwnedBuffer, ModuleFromArchive<'static>>,
}
Fields§
§unsafe_self_cell: UnsafeSelfCell<ArtifactBuildFromArchiveCell, OwnedBuffer, ModuleFromArchive<'static>>
Implementations§
source§impl ArtifactBuildFromArchiveCell
impl ArtifactBuildFromArchiveCell
sourcefn new(
owner: OwnedBuffer,
dependent_builder: impl for<'_q> FnOnce(&'_q OwnedBuffer) -> ModuleFromArchive<'_q>,
) -> Self
fn new( owner: OwnedBuffer, dependent_builder: impl for<'_q> FnOnce(&'_q OwnedBuffer) -> ModuleFromArchive<'_q>, ) -> Self
Constructs a new self-referential struct.
The provided owner
will be moved into a heap allocated box.
Followed by construction of the dependent value, by calling
dependent_builder
with a shared reference to the owner that
remains valid for the lifetime of the constructed struct.
sourcefn try_new<Err>(
owner: OwnedBuffer,
dependent_builder: impl for<'_q> FnOnce(&'_q OwnedBuffer) -> Result<ModuleFromArchive<'_q>, Err>,
) -> Result<Self, Err>
fn try_new<Err>( owner: OwnedBuffer, dependent_builder: impl for<'_q> FnOnce(&'_q OwnedBuffer) -> Result<ModuleFromArchive<'_q>, Err>, ) -> Result<Self, Err>
Tries to create a new structure with a given dependent builder.
Consumes owner on error.
sourcefn try_new_or_recover<Err>(
owner: OwnedBuffer,
dependent_builder: impl for<'_q> FnOnce(&'_q OwnedBuffer) -> Result<ModuleFromArchive<'_q>, Err>,
) -> Result<Self, (OwnedBuffer, Err)>
fn try_new_or_recover<Err>( owner: OwnedBuffer, dependent_builder: impl for<'_q> FnOnce(&'_q OwnedBuffer) -> Result<ModuleFromArchive<'_q>, Err>, ) -> Result<Self, (OwnedBuffer, Err)>
Tries to create a new structure with a given dependent builder.
Returns owner on error.
sourcefn borrow_owner<'_q>(&'_q self) -> &'_q OwnedBuffer
fn borrow_owner<'_q>(&'_q self) -> &'_q OwnedBuffer
Borrows owner.
sourcefn with_dependent<'outer_fn, Ret>(
&'outer_fn self,
func: impl for<'_q> FnOnce(&'_q OwnedBuffer, &'outer_fn ModuleFromArchive<'_q>) -> Ret,
) -> Ret
fn with_dependent<'outer_fn, Ret>( &'outer_fn self, func: impl for<'_q> FnOnce(&'_q OwnedBuffer, &'outer_fn ModuleFromArchive<'_q>) -> Ret, ) -> Ret
Calls given closure func
with a shared reference to dependent.
sourcefn with_dependent_mut<'outer_fn, Ret>(
&'outer_fn mut self,
func: impl for<'_q> FnOnce(&'_q OwnedBuffer, &'outer_fn mut ModuleFromArchive<'_q>) -> Ret,
) -> Ret
fn with_dependent_mut<'outer_fn, Ret>( &'outer_fn mut self, func: impl for<'_q> FnOnce(&'_q OwnedBuffer, &'outer_fn mut ModuleFromArchive<'_q>) -> Ret, ) -> Ret
Calls given closure func
with an unique reference to dependent.
sourcefn borrow_dependent<'_q>(&'_q self) -> &'_q ModuleFromArchive<'_q>
fn borrow_dependent<'_q>(&'_q self) -> &'_q ModuleFromArchive<'_q>
Borrows dependent.
sourcefn into_owner(self) -> OwnedBuffer
fn into_owner(self) -> OwnedBuffer
Consumes self
and returns the the owner.
Trait Implementations§
source§impl Debug for ArtifactBuildFromArchiveCell
impl Debug for ArtifactBuildFromArchiveCell
Auto Trait Implementations§
impl Freeze for ArtifactBuildFromArchiveCell
impl RefUnwindSafe for ArtifactBuildFromArchiveCell
impl Send for ArtifactBuildFromArchiveCell
impl Sync for ArtifactBuildFromArchiveCell
impl Unpin for ArtifactBuildFromArchiveCell
impl UnwindSafe for ArtifactBuildFromArchiveCell
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§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
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.
§impl<T> Pointee for T
impl<T> Pointee for T
source§impl<T> Upcastable for T
impl<T> Upcastable for T
source§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
source§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref