pub struct SerdeFile<T> { /* private fields */ }Implementations§
Source§impl<T> SerdeFile<T>where
T: Serialize + for<'a> Deserialize<'a>,
impl<T> SerdeFile<T>where
T: Serialize + for<'a> Deserialize<'a>,
pub async fn open<P: AsRef<Path>>(path: P) -> Result<Self>
pub async fn create<P: AsRef<Path>>(path: P) -> Result<Self>
pub async fn create_new<P: AsRef<Path>>(path: P) -> Result<Self>
pub async fn from_open_options<P: AsRef<Path>>( path: P, options: OpenOptions, ) -> Result<Self>
pub async fn metadata(&self) -> Result<Metadata>
pub fn try_clone(&self) -> Result<Self>
pub async fn write(&mut self, contents: T) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for SerdeFile<T>
impl<T> RefUnwindSafe for SerdeFile<T>
impl<T> Send for SerdeFile<T>
impl<T> Sync for SerdeFile<T>
impl<T> Unpin for SerdeFile<T>
impl<T> UnsafeUnpin for SerdeFile<T>
impl<T> UnwindSafe for SerdeFile<T>
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