pub trait DavFile:
Debug
+ Send
+ Sync {
// Required methods
fn metadata(&mut self) -> FsFuture<'_, Box<dyn DavMetaData>>;
fn write_buf(&mut self, buf: Box<dyn Buf + Send>) -> FsFuture<'_, ()>;
fn write_bytes(&mut self, buf: Bytes) -> FsFuture<'_, ()>;
fn read_bytes(&mut self, count: usize) -> FsFuture<'_, Bytes>;
fn seek(&mut self, pos: SeekFrom) -> FsFuture<'_, u64>;
fn flush(&mut self) -> FsFuture<'_, ()>;
// Provided method
fn redirect_url(&mut self) -> FsFuture<'_, Option<String>> { ... }
}
Expand description
A DavFile
is the equivalent of std::fs::File
, should be
readable/writeable/seekable, and be able to return its metadata.