pub struct Provider(/* private fields */);
Implementations§
Source§impl Provider
impl Provider
Sourcepub fn load(ctx: Option<&LibCtxRef>, name: &str) -> Result<Self, ErrorStack>
pub fn load(ctx: Option<&LibCtxRef>, name: &str) -> Result<Self, ErrorStack>
Loads a new provider into the specified library context, disabling the fallback providers.
If ctx
is None
, the provider will be loaded in to the default library context.
This corresponds to OSSL_provider_load
.
Sourcepub fn try_load(
ctx: Option<&LibCtxRef>,
name: &str,
retain_fallbacks: bool,
) -> Result<Self, ErrorStack>
pub fn try_load( ctx: Option<&LibCtxRef>, name: &str, retain_fallbacks: bool, ) -> Result<Self, ErrorStack>
Loads a new provider into the specified library context, disabling the fallback providers if retain_fallbacks
is false
and the load succeeds.
If ctx
is None
, the provider will be loaded into the default library context.
This corresponds to OSSL_provider_try_load
.
Sourcepub fn set_default_search_path(
ctx: Option<&LibCtxRef>,
path: &str,
) -> Result<(), ErrorStack>
pub fn set_default_search_path( ctx: Option<&LibCtxRef>, path: &str, ) -> Result<(), ErrorStack>
Specifies the default search path that is to be used for looking for providers in the specified library context. If left unspecified, an environment variable and a fall back default value will be used instead
If ctx
is None
, the provider will be loaded into the default library context.
This corresponds to OSSL_PROVIDER_set_default_search_path
.
Trait Implementations§
Source§impl AsRef<ProviderRef> for Provider
impl AsRef<ProviderRef> for Provider
Source§fn as_ref(&self) -> &ProviderRef
fn as_ref(&self) -> &ProviderRef
Source§impl Borrow<ProviderRef> for Provider
impl Borrow<ProviderRef> for Provider
Source§fn borrow(&self) -> &ProviderRef
fn borrow(&self) -> &ProviderRef
Source§impl Deref for Provider
impl Deref for Provider
Source§type Target = ProviderRef
type Target = ProviderRef
Source§fn deref(&self) -> &ProviderRef
fn deref(&self) -> &ProviderRef
Source§impl DerefMut for Provider
impl DerefMut for Provider
Source§fn deref_mut(&mut self) -> &mut ProviderRef
fn deref_mut(&mut self) -> &mut ProviderRef
Source§impl ForeignType for Provider
impl ForeignType for Provider
Source§type CType = OSSL_PROVIDER
type CType = OSSL_PROVIDER
Source§type Ref = ProviderRef
type Ref = ProviderRef
Source§unsafe fn from_ptr(ptr: *mut OSSL_PROVIDER) -> Provider
unsafe fn from_ptr(ptr: *mut OSSL_PROVIDER) -> Provider
Source§fn as_ptr(&self) -> *mut OSSL_PROVIDER
fn as_ptr(&self) -> *mut OSSL_PROVIDER
impl Send for Provider
impl Sync for Provider
Auto Trait Implementations§
impl Freeze for Provider
impl RefUnwindSafe for Provider
impl Unpin for Provider
impl UnwindSafe for Provider
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
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 8 bytes