pub struct KeyFile(/* private fields */);Expand description
A written key file, removed when dropped (the app closes its control port).
Implementations§
Source§impl KeyFile
impl KeyFile
Sourcepub fn create(path: impl Into<PathBuf>, key: &str) -> Result<KeyFile, String>
pub fn create(path: impl Into<PathBuf>, key: &str) -> Result<KeyFile, String>
Write key to path (as write_key_file does) and keep the file until this is dropped:
for an app that serves the protocol itself instead of through crate::Server
(key_path gives the path clients look at).
pub fn path(&self) -> &Path
Trait Implementations§
Auto Trait Implementations§
impl Forget for KeyFile
impl Freeze for KeyFile
impl Move for KeyFile
impl RefUnwindSafe for KeyFile
impl Send for KeyFile
impl Sync for KeyFile
impl Unpin for KeyFile
impl UnsafeUnpin for KeyFile
impl UnwindSafe for KeyFile
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