pub struct KeyMaterial {
pub method: String,
pub label: String,
pub bytes: Vec<u8>,
}Expand description
The public key material a method gives the trust store for one peer, with the name of the method that understands it.
The store keeps the bytes as they are and never interprets them: a PEM certificate’s DER
for tls, a raw public key for a key-based method. The peer’s id is the SHA-256 of
bytes (id); a method whose ids use another algorithm does not store
its keys here.
Plain data: build it with new or the public fields.
Fields§
§method: StringThe method name, lowercase letters, digits and -, 1 to 32 characters: tls.
label: StringThe PEM label the bytes are stored under, uppercase letters, digits and spaces:
CERTIFICATE. A standard label keeps the file readable by standard tools.
bytes: Vec<u8>The key bytes, at most MAX_KEY_BYTES.
Implementations§
Source§impl KeyMaterial
impl KeyMaterial
Trait Implementations§
Source§impl Clone for KeyMaterial
impl Clone for KeyMaterial
Source§impl Debug for KeyMaterial
impl Debug for KeyMaterial
impl Eq for KeyMaterial
Source§impl PartialEq for KeyMaterial
impl PartialEq for KeyMaterial
impl StructuralPartialEq for KeyMaterial
Auto Trait Implementations§
impl Freeze for KeyMaterial
impl RefUnwindSafe for KeyMaterial
impl Send for KeyMaterial
impl Sync for KeyMaterial
impl Unpin for KeyMaterial
impl UnsafeUnpin for KeyMaterial
impl UnwindSafe for KeyMaterial
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