pub enum ResourceCommand<C> {
Open {
key: ResourceKey,
scope: ScopeId,
command: C,
},
Close {
key: ResourceKey,
scope: ScopeId,
},
Replace {
key: ResourceKey,
scope: ScopeId,
command: C,
},
Refresh {
key: ResourceKey,
scope: ScopeId,
command: C,
},
}Expand description
Data-only command describing an external resource lifecycle change.
Variants§
Open
Open a resource with an application-defined command payload.
Fields
§
key: ResourceKeyResource identity understood by the graph.
§
command: CHost-defined command payload.
Close
Close a resource after its final graph-visible owner is removed.
Fields
§
key: ResourceKeyResource identity understood by the graph.
Replace
Replace a live resource with an application-defined command payload.
Fields
§
key: ResourceKeyResource identity understood by the graph.
§
command: CHost-defined command payload.
Refresh
Refresh a live resource with an application-defined command payload.
Fields
§
key: ResourceKeyResource identity understood by the graph.
§
command: CHost-defined command payload.
Implementations§
Source§impl<C> ResourceCommand<C>
impl<C> ResourceCommand<C>
Trait Implementations§
Source§impl<C: Clone> Clone for ResourceCommand<C>
impl<C: Clone> Clone for ResourceCommand<C>
Source§fn clone(&self) -> ResourceCommand<C>
fn clone(&self) -> ResourceCommand<C>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<C: Debug> Debug for ResourceCommand<C>
impl<C: Debug> Debug for ResourceCommand<C>
impl<C: Eq> Eq for ResourceCommand<C>
Source§impl<C: PartialEq> PartialEq for ResourceCommand<C>
impl<C: PartialEq> PartialEq for ResourceCommand<C>
Source§fn eq(&self, other: &ResourceCommand<C>) -> bool
fn eq(&self, other: &ResourceCommand<C>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<C: PartialEq> StructuralPartialEq for ResourceCommand<C>
Auto Trait Implementations§
impl<C> Freeze for ResourceCommand<C>where
C: Freeze,
impl<C> RefUnwindSafe for ResourceCommand<C>where
C: RefUnwindSafe,
impl<C> Send for ResourceCommand<C>where
C: Send,
impl<C> Sync for ResourceCommand<C>where
C: Sync,
impl<C> Unpin for ResourceCommand<C>where
C: Unpin,
impl<C> UnsafeUnpin for ResourceCommand<C>where
C: UnsafeUnpin,
impl<C> UnwindSafe for ResourceCommand<C>where
C: UnwindSafe,
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