Struct FileKeySource
pub struct FileKeySource { /* private fields */ }Expand description
File-system backed key source. Reads/writes a 32-byte hex-encoded
key at the given path (default: ~/.zeroclaw/.secret_key, 0600).
Implementations§
Source§impl FileKeySource
impl FileKeySource
pub fn new(key_path: PathBuf) -> FileKeySource
Trait Implementations§
Source§impl Clone for FileKeySource
impl Clone for FileKeySource
Source§fn clone(&self) -> FileKeySource
fn clone(&self) -> FileKeySource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · §fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FileKeySource
impl Debug for FileKeySource
Source§impl KeySource for FileKeySource
impl KeySource for FileKeySource
Source§fn with_key(
&self,
f: &mut dyn FnMut(&[u8; 32]) -> Result<(), Error>,
) -> Result<(), Error>
fn with_key( &self, f: &mut dyn FnMut(&[u8; 32]) -> Result<(), Error>, ) -> Result<(), Error>
Run
f with a reference to the 256-bit master key. The
reference is only valid during the call.Source§fn backend_name(&self) -> &'static str
fn backend_name(&self) -> &'static str
Human-readable label for diagnostic messages.
Source§fn provisioning_state(&self) -> ProvisioningState
fn provisioning_state(&self) -> ProvisioningState
Local-only provisioning check — MUST NOT run scripts or
prompt for user input.
Auto Trait Implementations§
impl Freeze for FileKeySource
impl RefUnwindSafe for FileKeySource
impl Send for FileKeySource
impl Sync for FileKeySource
impl Unpin for FileKeySource
impl UnsafeUnpin for FileKeySource
impl UnwindSafe for FileKeySource
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more