pub enum Source {
Os,
File {
path: PathBuf,
},
}Expand description
Where the extra entropy comes from.
Variants§
Os
The operating system CSPRNG (getrandom). The default, and the floor
that mixing guarantees every other variant stays above.
File
A character device or file — /dev/random, an rng-tools device, a
hardware RNG exposed as a node. Read with a timeout, because
/dev/random can block and a generator pane that hangs forever is a bug
report, not a security feature.
Implementations§
Source§impl Source
impl Source
Sourcepub fn is_external(&self) -> bool
pub fn is_external(&self) -> bool
True when this source contributes bytes from outside the OS CSPRNG.
Sourcepub fn label(&self) -> String
pub fn label(&self) -> String
Human label, also what the CLI reports in its output metadata so a caller can tell how a secret was produced.
Sourcepub fn availability(&self) -> Availability
pub fn availability(&self) -> Availability
Whether this machine can actually use the source right now.
Trait Implementations§
impl Eq for Source
impl StructuralPartialEq for Source
Auto Trait Implementations§
impl Freeze for Source
impl RefUnwindSafe for Source
impl Send for Source
impl Sync for Source
impl Unpin for Source
impl UnsafeUnpin for Source
impl UnwindSafe for Source
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.