pub struct Handle<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: LoadStateProvider>(&self, loader: &T) -> LoadState
fn load_state<T: LoadStateProvider>(&self, loader: &T) -> LoadState
Returns the load status of the artifact. Read more
fn artifact_id<T: LoadStateProvider>(&self, loader: &T) -> ArtifactId
Source§fn artifact<'a, T, S: TypedArtifactStorage<T>>(
&self,
storage: &'a S,
) -> Option<&'a T>where
Self: Sized,
fn artifact<'a, T, S: TypedArtifactStorage<T>>(
&self,
storage: &'a S,
) -> Option<&'a T>where
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::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Handle<T>, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T: ?Sized> From<GenericHandle> for Handle<T>
impl<T: ?Sized> From<GenericHandle> for Handle<T>
Source§fn from(handle: GenericHandle) -> Self
fn from(handle: GenericHandle) -> Self
Converts to this type from the input type.
impl<T: Eq + ?Sized> 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