pub struct Handle<T>where
T: ?Sized,{ /* private fields */ }
Expand description
Handle to an artifact.
Implementations§
Trait Implementations§
Source§impl<T> ArtifactHandle for Handle<T>
impl<T> ArtifactHandle for Handle<T>
fn resolved_load_handle(&self) -> &Arc<ResolvedLoadHandle>
Source§fn load_state<T>(&self, loader: &T) -> LoadStatewhere
T: LoadStateProvider,
fn load_state<T>(&self, loader: &T) -> LoadStatewhere
T: LoadStateProvider,
Returns the load status of the artifact. Read more
fn artifact_id<T>(&self, loader: &T) -> ArtifactIdwhere
T: LoadStateProvider,
Source§fn artifact<'a, T, S>(&self, storage: &'a S) -> Option<&'a T>where
S: TypedArtifactStorage<T>,
Self: Sized,
fn artifact<'a, T, S>(&self, storage: &'a S) -> Option<&'a T>where
S: TypedArtifactStorage<T>,
Self: Sized,
Returns an immutable reference to the artifact if it is committed. Read more
Source§fn downgrade(&self) -> WeakHandle
fn downgrade(&self) -> WeakHandle
Downgrades this handle into a
WeakHandle
. Read moreSource§fn load_handle(&self) -> LoadHandle
fn load_handle(&self) -> LoadHandle
Returns the
LoadHandle
of this artifact handle.fn direct_load_handle(&self) -> LoadHandle
Source§impl<'de, T> Deserialize<'de> for Handle<T>
impl<'de, T> Deserialize<'de> for Handle<T>
Source§fn deserialize<D>(
deserializer: D,
) -> Result<Handle<T>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Handle<T>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T> From<GenericHandle> for Handle<T>where
T: ?Sized,
impl<T> From<GenericHandle> for Handle<T>where
T: ?Sized,
Source§fn from(handle: GenericHandle) -> Handle<T>
fn from(handle: GenericHandle) -> Handle<T>
Converts to this type from the input type.
Source§impl<T> Serialize for Handle<T>
impl<T> Serialize for Handle<T>
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<T> Eq for Handle<T>
Auto Trait Implementations§
impl<T> Freeze for Handle<T>where
T: ?Sized,
impl<T> RefUnwindSafe for Handle<T>where
T: RefUnwindSafe + ?Sized,
impl<T> Send for Handle<T>
impl<T> Sync for Handle<T>
impl<T> Unpin for Handle<T>
impl<T> UnwindSafe for Handle<T>where
T: UnwindSafe + ?Sized,
Blanket Implementations§
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.