pub struct Actor { /* private fields */ }
Expand description
An actor is a WebAssembly module that conforms to the waSCC protocols and can securely consume capabilities exposed by native or portable capability providers
Implementations§
Source§impl Actor
impl Actor
Sourcepub fn from_slice(buf: &[u8]) -> Result<Actor>
pub fn from_slice(buf: &[u8]) -> Result<Actor>
Create an actor from the bytes of a signed WebAssembly module. Attempting to load an unsigned module, or a module signed improperly, will result in an error
Sourcepub fn from_file(path: impl AsRef<Path>) -> Result<Actor>
pub fn from_file(path: impl AsRef<Path>) -> Result<Actor>
Create an actor from a signed WebAssembly (.wasm
) file
Sourcepub fn public_key(&self) -> String
pub fn public_key(&self) -> String
Obtain the actor’s public key (The sub
field of a JWT). This can be treated as a globally unique identifier
Sourcepub fn issuer(&self) -> String
pub fn issuer(&self) -> String
Obtain the public key of the issuer of the actor’s signed token (the iss
field of the JWT)
Sourcepub fn capabilities(&self) -> Vec<String>
pub fn capabilities(&self) -> Vec<String>
Obtain the list of capabilities declared in this actor’s embedded token
Obtain the list of tags in the actor’s token
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Actor
impl RefUnwindSafe for Actor
impl Send for Actor
impl Sync for Actor
impl Unpin for Actor
impl UnwindSafe for Actor
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more