pub struct FormationAuthority { /* private fields */ }Expand description
A formation’s signing key: generated by the launcher for one formation and held in its memory alone. Dropping it — at teardown — leaves nothing that can mint for that formation again.
ring keeps the expanded key in its own type, which does not zeroize on drop; the seed it was
built from is zeroized here as soon as the key pair exists.
Implementations§
Source§impl FormationAuthority
impl FormationAuthority
Sourcepub fn generate(formation_id: &FormationId) -> Result<Self, String>
pub fn generate(formation_id: &FormationId) -> Result<Self, String>
A fresh key pair for formation_id, from the operating system’s CSPRNG.
The Err is the operating system refusing randomness, and carries no key material.
pub fn formation_id(&self) -> &FormationId
Sourcepub fn mint(&self, from: &str, to: &str) -> FormationToken
pub fn mint(&self, from: &str, to: &str) -> FormationToken
The token from presents at to’s door.
Sourcepub fn verify_key(&self) -> FormationVerifyKey
pub fn verify_key(&self) -> FormationVerifyKey
The public half, which every member’s door verifies with.
Sourcepub fn member_bundle(&self, member: &str, callees: &[&str]) -> FormationBundle
pub fn member_bundle(&self, member: &str, callees: &[&str]) -> FormationBundle
What member is handed on its channel’s first line: the formation, its own name, the
verification key, and one token per name in callees, in the order given.
Trait Implementations§
Auto Trait Implementations§
impl Forget for FormationAuthority
impl Freeze for FormationAuthority
impl Move for FormationAuthority
impl RefUnwindSafe for FormationAuthority
impl Send for FormationAuthority
impl Sync for FormationAuthority
impl Unpin for FormationAuthority
impl UnsafeUnpin for FormationAuthority
impl UnwindSafe for FormationAuthority
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> 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