pub trait RngProvider: Send + Sync {
// Required methods
fn create_rng(&self, config: &RngConfig) -> Result<Box<dyn SecureRng>>;
fn name(&self) -> &'static str;
fn capabilities(&self) -> ProviderCapabilities;
// Provided methods
fn supports_config(&self, config: &RngConfig) -> bool { ... }
fn priority(&self) -> u32 { ... }
}Expand description
RNG provider trait for creating and managing RNG instances
This trait defines the interface for RNG providers that can create and manage RNG instances with different characteristics.
Required Methods§
Sourcefn name(&self) -> &'static str
fn name(&self) -> &'static str
Get the provider’s name
Returns a human-readable name for the provider.
Sourcefn capabilities(&self) -> ProviderCapabilities
fn capabilities(&self) -> ProviderCapabilities
Get the provider’s capabilities
Returns the capabilities of the provider.
Provided Methods§
Sourcefn supports_config(&self, config: &RngConfig) -> bool
fn supports_config(&self, config: &RngConfig) -> bool
Check if the provider supports a specific configuration
§Arguments
config- Configuration to check
Returns true if the provider supports the configuration.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl RngProvider for LibQRngProvider
Available on crate feature
alloc only.