pub struct PartialKeypair {
pub public: VerifyingKey,
pub secret: Option<SigningKey>,
}Expand description
Key pair where for read-only hypercores the secret key can also be missing.
Fields§
§public: VerifyingKeyPublic key
secret: Option<SigningKey>Secret key. If None, the hypercore is read-only.
Trait Implementations§
Source§impl Clone for PartialKeypair
impl Clone for PartialKeypair
Source§fn clone(&self) -> PartialKeypair
fn clone(&self) -> PartialKeypair
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl CompactEncoding<PartialKeypair> for State
NB: In Javascript’s sodium the secret key contains in itself also the public key, so to
maintain binary compatibility, we store the public key in the oplog now twice.
impl CompactEncoding<PartialKeypair> for State
NB: In Javascript’s sodium the secret key contains in itself also the public key, so to maintain binary compatibility, we store the public key in the oplog now twice.
Source§fn preencode(&mut self, value: &PartialKeypair) -> Result<usize, EncodingError>
fn preencode(&mut self, value: &PartialKeypair) -> Result<usize, EncodingError>
Preencode
Source§fn encode(
&mut self,
value: &PartialKeypair,
buffer: &mut [u8],
) -> Result<usize, EncodingError>
fn encode( &mut self, value: &PartialKeypair, buffer: &mut [u8], ) -> Result<usize, EncodingError>
Encode
Source§fn decode(&mut self, buffer: &[u8]) -> Result<PartialKeypair, EncodingError>
fn decode(&mut self, buffer: &[u8]) -> Result<PartialKeypair, EncodingError>
Decode
Auto Trait Implementations§
impl Freeze for PartialKeypair
impl RefUnwindSafe for PartialKeypair
impl Send for PartialKeypair
impl Sync for PartialKeypair
impl Unpin for PartialKeypair
impl UnwindSafe for PartialKeypair
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