pub struct SucFile { /* private fields */ }
Expand description
A SucFile. Represents the actual file.
Implementations§
Source§impl SucFile
impl SucFile
Sourcepub fn open<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn open<P: AsRef<Path>>(path: P) -> Result<Self>
Opens an actual file as a sucfile. If the file at the given path does not exist, the file is created and then opened.
Sourcepub fn add(&mut self, key: &str, value: &str) -> Result<()>
pub fn add(&mut self, key: &str, value: &str) -> Result<()>
Add key and hash of value to the file (key would be username, value would be password)
Returns Ok(()) if successful
Auto Trait Implementations§
impl Freeze for SucFile
impl RefUnwindSafe for SucFile
impl Send for SucFile
impl Sync for SucFile
impl Unpin for SucFile
impl UnwindSafe for SucFile
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