Re-exported from core::cap::Exclusive!.
forall 'r.
struct Exclusive! { ... }
The sole read and write capability for domain 'r.
Methods
method freshsource
fn fresh() -> exists 'r. (Brand['r], Exclusive!['r]) { ... }
A capability for a new domain, with that domain's brand.
The only minting path. Freshness prevents an existing domain from acquiring a second Exclusive! token through a copied Brand.
method stampsource
fn stamp(&self) -> Stamp['r] { ... }
The domain's brand, sealed in a Stamp that only core can open.
method retiresource
fn retire(self) -> () { ... }
Ends the capability.
A resource's finalizer can consume its exclusive token here after retiring the protected state. This does not deallocate anything.
Instances
instance Access[Exclusive!['k] -> 'k, ()]source
forall 'k.
instance Access[Exclusive!['k] -> 'k, ()] { ... }
In std::cap.
An Exclusive! lends itself, with nothing else held.
instance ReadBytes[Exclusive!['r], Slice[u8, 'r]]source
forall 'r.
instance ReadBytes[Exclusive!['r], Slice[u8, 'r]] { ... }
In std::slice.
A byte slice is read through its domain's Exclusive!.
instance ReadBytes[Exclusive!['r], Str['r]]source
forall 'r.
instance ReadBytes[Exclusive!['r], Str['r]] { ... }
In std::str.
Text is read through its domain's Exclusive!.