pub struct Memory(/* private fields */);Expand description
Representation of an in-memory certificate store.
Internally this contains a CertStore which this type can be converted to.
Implementations§
Source§impl Memory
impl Memory
Sourcepub fn new() -> Result<Memory>
pub fn new() -> Result<Memory>
Creates a new in-memory certificate store which certificates and CTLs can be added to.
Initially the returned certificate store contains no certificates.
Sourcepub fn add_encoded_certificate(&mut self, cert: &[u8]) -> Result<CertContext>
pub fn add_encoded_certificate(&mut self, cert: &[u8]) -> Result<CertContext>
Adds a new certificate to this memory store.
For example the bytes could be a DER-encoded certificate.
Sourcepub fn add_encoded_ctl(&mut self, ctl: &[u8]) -> Result<CtlContext>
pub fn add_encoded_ctl(&mut self, ctl: &[u8]) -> Result<CtlContext>
Adds a new CTL to this memory store, in its encoded form.
This can be created through the ctl_context::Builder type.
Sourcepub fn into_store(self) -> CertStore
pub fn into_store(self) -> CertStore
Consumes this memory store, returning the underlying CertStore.
Auto Trait Implementations§
impl Freeze for Memory
impl RefUnwindSafe for Memory
impl Send for Memory
impl Sync for Memory
impl Unpin for Memory
impl UnwindSafe for Memory
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