pub struct MachineIdentity { /* private fields */ }Expand description
A machine as Lys records it: its Ed25519 public key.
Implementations§
Source§impl MachineIdentity
impl MachineIdentity
Sourcepub const fn new(ed25519_public: [u8; 32]) -> Self
pub const fn new(ed25519_public: [u8; 32]) -> Self
A machine from the Ed25519 public key Lys recorded for it.
Sourcepub const fn ed25519_public(&self) -> &[u8; 32]
pub const fn ed25519_public(&self) -> &[u8; 32]
The recorded Ed25519 public key.
Sourcepub fn x25519_public(&self) -> Result<[u8; 32], LinkHandshakeError>
pub fn x25519_public(&self) -> Result<[u8; 32], LinkHandshakeError>
The machine’s X25519 static public key: the Montgomery form of its Ed25519 point, the same map lys-core applies to its own identity.
§Errors
The recorded bytes are not a valid Ed25519 public key.
Trait Implementations§
Source§impl Clone for MachineIdentity
impl Clone for MachineIdentity
impl Copy for MachineIdentity
Source§impl Debug for MachineIdentity
impl Debug for MachineIdentity
impl Eq for MachineIdentity
Source§impl PartialEq for MachineIdentity
impl PartialEq for MachineIdentity
impl StructuralPartialEq for MachineIdentity
Auto Trait Implementations§
impl Freeze for MachineIdentity
impl RefUnwindSafe for MachineIdentity
impl Send for MachineIdentity
impl Sync for MachineIdentity
impl Unpin for MachineIdentity
impl UnsafeUnpin for MachineIdentity
impl UnwindSafe for MachineIdentity
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.