pub struct Gpgme { /* private fields */ }
Expand description
A type for managing the library’s configuration.
Implementations
sourceimpl Gpgme
impl Gpgme
pub const HOME_DIR: &'static str = "homedir"
pub const AGENT_SOCKET: &'static str = "agent-socket"
pub const UISERVER_SOCKET: &'static str = "uiserver-socket"
pub const GPGCONF_NAME: &'static str = "gpgconf-name"
pub const GPG_NAME: &'static str = "gpg-name"
pub const GPGSM_NAME: &'static str = "gpgsm-name"
pub const G13_NAME: &'static str = "g13-name"
sourcepub fn check_version(&self, version: impl CStrArgument) -> bool
pub fn check_version(&self, version: impl CStrArgument) -> 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
.
Upstream documentation:
gpgme_check_version
Examples
let gpgme = gpgme::init();
assert!(gpgme.check_version("1.4.0"));
sourcepub fn get_dir_info(
&self,
what: impl CStrArgument
) -> Result<&'static str, Option<Utf8Error>>
pub fn get_dir_info(
&self,
what: impl CStrArgument
) -> Result<&'static str, Option<Utf8Error>>
Returns the default value for specified configuration option.
Commonly supported values for what
are provided as associated constants.
Upstream documentation:
gpgme_get_dirinfo
sourcepub fn get_dir_info_raw(&self, what: impl CStrArgument) -> Option<&'static CStr>
pub fn get_dir_info_raw(&self, what: impl CStrArgument) -> Option<&'static CStr>
Returns the default value for specified configuration option.
Commonly supported values for what
are provided as associated constants.
Upstream documentation:
gpgme_get_dirinfo
sourcepub fn check_engine_version(&self, proto: Protocol) -> Result<()>
pub fn check_engine_version(&self, proto: Protocol) -> Result<()>
Checks that the engine implementing the specified protocol is supported by the library.
Upstream documentation:
gpgme_engine_check_version
sourcepub fn engine_info(&self) -> Result<EngineInfoGuard>
pub fn engine_info(&self) -> Result<EngineInfoGuard>
Returns an iterator yielding information on each of the globally configured engines.
Upstream documentation:
gpgme_get_engine_info
pub fn set_engine_path(
&self,
proto: Protocol,
path: impl CStrArgument
) -> Result<()>
pub fn set_engine_home_dir(
&self,
proto: Protocol,
home_dir: impl CStrArgument
) -> Result<()>
sourcepub fn set_engine_info(
&self,
proto: Protocol,
path: Option<impl CStrArgument>,
home_dir: Option<impl CStrArgument>
) -> Result<()>
pub fn set_engine_info(
&self,
proto: Protocol,
path: Option<impl CStrArgument>,
home_dir: Option<impl CStrArgument>
) -> Result<()>
Upstream documentation:
gpgme_set_engine_info