pub struct SourceResourceContext { /* private fields */ }Expand description
Opaque shared resource account. The resource implementation supplies and recovers its concrete account; source authority is validated independently.
Implementations§
Source§impl SourceResourceContext
impl SourceResourceContext
pub fn new<T: Any + Send + Sync>(value: Arc<T>) -> Self
Sourcepub fn new_accounted<T: Any + Send + Sync + AllocationAccount>(
value: Arc<T>,
) -> Self
pub fn new_accounted<T: Any + Send + Sync + AllocationAccount>( value: Arc<T>, ) -> Self
Both views derive from one allocation. Resource capability alone never authenticates a source or authorizes decoder work.
pub fn downcast<T: Any + Send + Sync>(&self) -> Option<Arc<T>>
Sourcepub fn is_accounted(&self) -> bool
pub fn is_accounted(&self) -> bool
Reports a resource projection, never source authentication or active work.
Trait Implementations§
Source§impl Clone for SourceResourceContext
impl Clone for SourceResourceContext
Source§fn clone(&self) -> SourceResourceContext
fn clone(&self) -> SourceResourceContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SourceResourceContext
impl !RefUnwindSafe for SourceResourceContext
impl Send for SourceResourceContext
impl Sync for SourceResourceContext
impl Unpin for SourceResourceContext
impl !UnwindSafe for SourceResourceContext
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