Struct gpgme::Token [] [src]

pub struct Token(_);

A type for managing global resources within the library.

Methods

impl Token

fn check_version<S: Into<Vec<u8>>>(&self, version: S) -> bool

Checks that the linked version of the library is at least the specified version.

Note: false is returned, if version is not in the format MAJOR.MINOR.MICRO.

Examples

let gpgme = gpgme::init();
assert!(gpgme.check_version("1.4.0"));

fn version(&self) -> &'static str

Returns the version string for the library.

fn get_dir_info<S: Into<Vec<u8>>>(&self, what: S) -> StrResult<'static>

Returns the default value for specified configuration option.

Commonly supported values for what are specified in info.

This function requires a version of GPGme >= 1.5.0.

fn check_engine_version(&self, proto: Protocol) -> Result<()>

Checks that the engine implementing the specified protocol is supported by the library.

fn engine_info(&self) -> Result<EngineInfoGuard>

fn set_engine_filename<S>(&self, proto: Protocol, filename: S) -> Result<()> where S: Into<Vec<u8>>

fn set_engine_home_dir<S>(&self, proto: Protocol, home_dir: S) -> Result<()> where S: Into<Vec<u8>>

fn set_engine_info<S1, S2>(&self, proto: Protocol, filename: S1, home_dir: S2) -> Result<()> where S1: Into<Vec<u8>>, S2: Into<Vec<u8>>

Trait Implementations

Derived Implementations

impl Clone for Token

fn clone(&self) -> Token

1.0.0fn clone_from(&mut self, source: &Self)

impl Debug for Token

fn fmt(&self, __arg_0: &mut Formatter) -> Result