pub struct Device<S> { /* private fields */ }Expand description
A Device identifies the local node through its NodeId, and carries its
signing mechanism.
The signing mechanism is for node specific cryptography, e.g. signing
rad/sigrefs, COB commits, node messages, etc.
Note that a Device can create Signatures and ExtendedSignatures.
It can achieve this as long as S implements Signer<Signature>.
Implementations§
Source§impl<S> Device<S>
impl<S> Device<S>
Sourcepub fn public_key(&self) -> &PublicKey
pub fn public_key(&self) -> &PublicKey
Return the crypto::PublicKey of the Device.
Sourcepub fn into_inner(self) -> S
pub fn into_inner(self) -> S
Convert the Device into its signer.
This consumes the Device.
Source§impl<S: Signer<Signature> + 'static> Device<S>
impl<S: Signer<Signature> + 'static> Device<S>
Sourcepub fn boxed(self) -> BoxedDevice
pub fn boxed(self) -> BoxedDevice
Construct a BoxedDevice from a given Device.
Trait Implementations§
Source§impl AsRef<Device<BoxedSigner>> for BoxedDevice
impl AsRef<Device<BoxedSigner>> for BoxedDevice
Source§fn as_ref(&self) -> &Device<BoxedSigner>
fn as_ref(&self) -> &Device<BoxedSigner>
Converts this type into a shared reference of the (usually inferred) input type.
Auto Trait Implementations§
impl<S> Freeze for Device<S>where
S: Freeze,
impl<S> RefUnwindSafe for Device<S>where
S: RefUnwindSafe,
impl<S> Send for Device<S>where
S: Send,
impl<S> Sync for Device<S>where
S: Sync,
impl<S> Unpin for Device<S>where
S: Unpin,
impl<S> UnwindSafe for Device<S>where
S: UnwindSafe,
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