Struct prs_lib::crypto::Context [−][src]
pub struct Context { /* fields omitted */ }Expand description
Generic context.
Implementations
Trait Implementations
Encrypt plaintext for recipients.
Decrypt ciphertext.
Check whether we can decrypt ciphertext.
Obtain all public keys from keychain.
Obtain all public keys from keychain.
Import the given key from bytes into keychain.
Export the given key from the keychain as bytes.
Check whether this context supports the given protocol.
fn encrypt_file(
&mut self,
recipients: &Recipients,
plaintext: Plaintext,
path: &Path
) -> Result<()>
fn encrypt_file(
&mut self,
recipients: &Recipients,
plaintext: Plaintext,
path: &Path
) -> Result<()>Encrypt plaintext and write it to the file.
Decrypt ciphertext from file.
Check whether we can decrypt ciphertext from file.
Obtain a public key from keychain for fingerprint.
Find public keys from keychain for fingerprints. Read more
Import the given key from a file into keychain.
Auto Trait Implementations
impl !RefUnwindSafe for Contextimpl !UnwindSafe for ContextBlanket Implementations
type Err = NoError
type Err = NoErrorThe error type produced by a failed conversion.
pub fn approx_from(
src: Src
) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
pub fn approx_from(
src: Src
) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>Convert the given value into an approximately equivalent representation.
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::ErrThe error type produced by a failed conversion.
pub fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
pub fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>Convert the subject into an approximately equivalent representation.
Mutably borrows from an owned value. Read more
Approximate the subject to a given type with the default scheme.
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme, Approximate the subject to a given type with a specific scheme.
Attempt to convert the subject to a given type.
type Err = NoError
type Err = NoErrorThe error type produced by a failed conversion.
pub fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
pub fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>Convert the given value into an exactly equivalent representation.
type Err = <Dst as ValueFrom<Src>>::Err
type Err = <Dst as ValueFrom<Src>>::ErrThe error type produced by a failed conversion.
pub fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>
pub fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>Convert the subject into an exactly equivalent representation.