pub struct Author { /* private fields */ }
Expand description
Author key to insert entries in a crate::Replica
Internally, an author is a [SigningKey
] which is used to sign entries.
Implementations§
Source§impl Author
impl Author
Sourcepub fn new<R: CryptoRngCore + ?Sized>(rng: &mut R) -> Self
pub fn new<R: CryptoRngCore + ?Sized>(rng: &mut R) -> Self
Create a new Author
with a random key.
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Self
pub fn from_bytes(bytes: &[u8; 32]) -> Self
Create an Author
from a byte array.
Sourcepub fn public_key(&self) -> AuthorPublicKey
pub fn public_key(&self) -> AuthorPublicKey
Get the AuthorPublicKey
for this author.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Author
impl<'de> Deserialize<'de> for Author
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&Author> for AuthorPublicKey
impl From<&Author> for AuthorPublicKey
Source§impl From<Author> for AuthorPublicKey
impl From<Author> for AuthorPublicKey
Auto Trait Implementations§
impl Freeze for Author
impl RefUnwindSafe for Author
impl Send for Author
impl Sync for Author
impl Unpin for Author
impl UnwindSafe for Author
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§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