pub struct MessageSigner<S> { /* private fields */ }Expand description
A delegatee key acting inside one overlay: the authority that issues every
MessageVerification a node signs.
Signing is the map (delegatee_key, network_id) × (tag, data) → MessageVerification. This
type fixes the first component, so message constructors take one authority instead of a key
and an overlay that could be paired inconsistently. S is how the key is held: a borrowed
authority MessageSigner<&DelegateeKey> is Copy and is what signing functions take; an owned
authority MessageSigner<DelegateeKey> is what long-lived runtimes store, so the pairing is
never split across two fields.
Law: copying or cloning an authority is semantically invisible, since it names the same key and the same overlay.
Implementations§
Source§impl<S> MessageSigner<S>where
S: Borrow<DelegateeKey>,
impl<S> MessageSigner<S>where
S: Borrow<DelegateeKey>,
Sourcepub const fn new(delegatee_key: S, network_id: u32) -> MessageSigner<S>
pub const fn new(delegatee_key: S, network_id: u32) -> MessageSigner<S>
Let delegatee_key sign on behalf of the overlay network_id.
Sourcepub fn delegatee_public_key(&self) -> PublicKey<33>
pub fn delegatee_public_key(&self) -> PublicKey<33>
The public key of the session this authority signs with.
Sourcepub const fn network_id(&self) -> u32
pub const fn network_id(&self) -> u32
The overlay this authority signs for.
Sourcepub fn delegator_did(&self) -> Did
pub fn delegator_did(&self) -> Did
The account DID that authorized the delegatee key.
Sourcepub fn by_ref(&self) -> MessageSigner<&DelegateeKey>
pub fn by_ref(&self) -> MessageSigner<&DelegateeKey>
This authority borrowing its key: the form signing functions take.
Sourcepub fn owned(&self) -> MessageSigner<DelegateeKey>
pub fn owned(&self) -> MessageSigner<DelegateeKey>
This authority owning a copy of its key: the form long-lived runtimes store.
Trait Implementations§
Source§impl<S> Clone for MessageSigner<S>where
S: Clone,
impl<S> Clone for MessageSigner<S>where
S: Clone,
Source§fn clone(&self) -> MessageSigner<S>
fn clone(&self) -> MessageSigner<S>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl<S> Copy for MessageSigner<S>where
S: Copy,
Auto Trait Implementations§
impl<S> Forget for MessageSigner<S>
impl<S> Freeze for MessageSigner<S>where
S: Freeze,
impl<S> Move for MessageSigner<S>
impl<S> RefUnwindSafe for MessageSigner<S>where
S: RefUnwindSafe,
impl<S> Send for MessageSigner<S>where
S: Send,
impl<S> Sync for MessageSigner<S>where
S: Sync,
impl<S> Unpin for MessageSigner<S>where
S: Unpin,
impl<S> UnsafeUnpin for MessageSigner<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for MessageSigner<S>where
S: UnwindSafe,
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> ⓘ
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> ⓘ
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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
impl<T> MaybeSend for T
impl<T> MaybeSendSync for T
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.