pub struct WebDavFS<P, S> {
inner: Arc<DavFsInner<P, S>>,
}Expand description
DAV Filesystem implementation.
This is the main entry point for the DAV filesystem.
It implements DavFileSystem and can be used to serve a Repository via DAV.
Fields§
§inner: Arc<DavFsInner<P, S>>Implementations§
Source§impl<P: Send + Sync + 'static, S: IndexedFull + Send + Sync + 'static> WebDavFS<P, S>
impl<P: Send + Sync + 'static, S: IndexedFull + Send + Sync + 'static> WebDavFS<P, S>
Sourcepub(crate) fn new(
repo: Repository<P, S>,
vfs: Vfs,
file_policy: FilePolicy,
) -> Self
pub(crate) fn new( repo: Repository<P, S>, vfs: Vfs, file_policy: FilePolicy, ) -> Self
Create a new WebDavFS instance.
§Arguments
repo- TheRepositoryto usevfs- TheVfsto usefile_policy- TheFilePolicyto use
§Returns
A new WebDavFS instance
Trait Implementations§
Source§impl<P, S: IndexedFull> Clone for WebDavFS<P, S>
impl<P, S: IndexedFull> Clone for WebDavFS<P, S>
Source§impl<P: Debug + Send + Sync + 'static, S: IndexedFull + Debug + Send + Sync + 'static> DavFileSystem for WebDavFS<P, S>
impl<P: Debug + Send + Sync + 'static, S: IndexedFull + Debug + Send + Sync + 'static> DavFileSystem for WebDavFS<P, S>
Source§fn metadata<'a>(
&'a self,
davpath: &'a DavPath,
) -> FsFuture<'_, Box<dyn DavMetaData>>
fn metadata<'a>( &'a self, davpath: &'a DavPath, ) -> FsFuture<'_, Box<dyn DavMetaData>>
Return the metadata of a file or directory.
Source§fn symlink_metadata<'a>(
&'a self,
davpath: &'a DavPath,
) -> FsFuture<'_, Box<dyn DavMetaData>>
fn symlink_metadata<'a>( &'a self, davpath: &'a DavPath, ) -> FsFuture<'_, Box<dyn DavMetaData>>
Return the metadata of a file, directory or symbolic link. Read more
Source§fn read_dir<'a>(
&'a self,
davpath: &'a DavPath,
_meta: ReadDirMeta,
) -> FsFuture<'_, FsStream<Box<dyn DavDirEntry>>>
fn read_dir<'a>( &'a self, davpath: &'a DavPath, _meta: ReadDirMeta, ) -> FsFuture<'_, FsStream<Box<dyn DavDirEntry>>>
Lists entries within a directory.
Source§fn open<'a>(
&'a self,
path: &'a DavPath,
options: OpenOptions,
) -> FsFuture<'_, Box<dyn DavFile>>
fn open<'a>( &'a self, path: &'a DavPath, options: OpenOptions, ) -> FsFuture<'_, Box<dyn DavFile>>
Open a file.
Source§fn create_dir<'a>(
&'a self,
path: &'a DavPath,
) -> Pin<Box<dyn Future<Output = Result<(), FsError>> + Send + 'a>>
fn create_dir<'a>( &'a self, path: &'a DavPath, ) -> Pin<Box<dyn Future<Output = Result<(), FsError>> + Send + 'a>>
Create a directory. Read more
Source§fn remove_dir<'a>(
&'a self,
path: &'a DavPath,
) -> Pin<Box<dyn Future<Output = Result<(), FsError>> + Send + 'a>>
fn remove_dir<'a>( &'a self, path: &'a DavPath, ) -> Pin<Box<dyn Future<Output = Result<(), FsError>> + Send + 'a>>
Remove a directory. Read more
Source§fn remove_file<'a>(
&'a self,
path: &'a DavPath,
) -> Pin<Box<dyn Future<Output = Result<(), FsError>> + Send + 'a>>
fn remove_file<'a>( &'a self, path: &'a DavPath, ) -> Pin<Box<dyn Future<Output = Result<(), FsError>> + Send + 'a>>
Remove a file. Read more
Source§fn rename<'a>(
&'a self,
from: &'a DavPath,
to: &'a DavPath,
) -> Pin<Box<dyn Future<Output = Result<(), FsError>> + Send + 'a>>
fn rename<'a>( &'a self, from: &'a DavPath, to: &'a DavPath, ) -> Pin<Box<dyn Future<Output = Result<(), FsError>> + Send + 'a>>
Rename a file or directory. Read more
Source§fn copy<'a>(
&'a self,
from: &'a DavPath,
to: &'a DavPath,
) -> Pin<Box<dyn Future<Output = Result<(), FsError>> + Send + 'a>>
fn copy<'a>( &'a self, from: &'a DavPath, to: &'a DavPath, ) -> Pin<Box<dyn Future<Output = Result<(), FsError>> + Send + 'a>>
Copy a file. Read more
Source§fn have_props<'a>(
&'a self,
path: &'a DavPath,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'a>>
fn have_props<'a>( &'a self, path: &'a DavPath, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'a>>
Indicator that tells if this filesystem driver supports DAV properties. Read more
Source§fn patch_props<'a>(
&'a self,
path: &'a DavPath,
patch: Vec<(bool, DavProp)>,
) -> Pin<Box<dyn Future<Output = Result<Vec<(StatusCode, DavProp)>, FsError>> + Send + 'a>>
fn patch_props<'a>( &'a self, path: &'a DavPath, patch: Vec<(bool, DavProp)>, ) -> Pin<Box<dyn Future<Output = Result<Vec<(StatusCode, DavProp)>, FsError>> + Send + 'a>>
Patch the DAV properties of a node (add/remove props). Read more
Source§fn get_props<'a>(
&'a self,
path: &'a DavPath,
do_content: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<DavProp>, FsError>> + Send + 'a>>
fn get_props<'a>( &'a self, path: &'a DavPath, do_content: bool, ) -> Pin<Box<dyn Future<Output = Result<Vec<DavProp>, FsError>> + Send + 'a>>
List/get the DAV properties of a node. Read more
Auto Trait Implementations§
impl<P, S> Freeze for WebDavFS<P, S>
impl<P, S> !RefUnwindSafe for WebDavFS<P, S>
impl<P, S> Send for WebDavFS<P, S>
impl<P, S> Sync for WebDavFS<P, S>
impl<P, S> Unpin for WebDavFS<P, S>
impl<P, S> !UnwindSafe for WebDavFS<P, S>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<Fs> GuardedFileSystem<()> for Fs
impl<Fs> GuardedFileSystem<()> for Fs
Source§fn open<'a>(
&'a self,
path: &'a DavPath,
options: OpenOptions,
_credentials: &(),
) -> Pin<Box<dyn Future<Output = Result<Box<dyn DavFile>, FsError>> + Send + 'a>>
fn open<'a>( &'a self, path: &'a DavPath, options: OpenOptions, _credentials: &(), ) -> Pin<Box<dyn Future<Output = Result<Box<dyn DavFile>, FsError>> + Send + 'a>>
Open a file.
Source§fn read_dir<'a>(
&'a self,
path: &'a DavPath,
meta: ReadDirMeta,
_credentials: &(),
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<Box<dyn DavDirEntry>, FsError>> + Send>>, FsError>> + Send + 'a>>
fn read_dir<'a>( &'a self, path: &'a DavPath, meta: ReadDirMeta, _credentials: &(), ) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<Box<dyn DavDirEntry>, FsError>> + Send>>, FsError>> + Send + 'a>>
Lists entries within a directory.
Source§fn metadata<'a>(
&'a self,
path: &'a DavPath,
_credentials: &(),
) -> Pin<Box<dyn Future<Output = Result<Box<dyn DavMetaData>, FsError>> + Send + 'a>>
fn metadata<'a>( &'a self, path: &'a DavPath, _credentials: &(), ) -> Pin<Box<dyn Future<Output = Result<Box<dyn DavMetaData>, FsError>> + Send + 'a>>
Return the metadata of a file or directory.
Source§fn symlink_metadata<'a>(
&'a self,
path: &'a DavPath,
_credentials: &(),
) -> Pin<Box<dyn Future<Output = Result<Box<dyn DavMetaData>, FsError>> + Send + 'a>>
fn symlink_metadata<'a>( &'a self, path: &'a DavPath, _credentials: &(), ) -> Pin<Box<dyn Future<Output = Result<Box<dyn DavMetaData>, FsError>> + Send + 'a>>
Return the metadata of a file, directory or symbolic link. Read more
Source§fn create_dir<'a>(
&'a self,
path: &'a DavPath,
_credentials: &(),
) -> Pin<Box<dyn Future<Output = Result<(), FsError>> + Send + 'a>>
fn create_dir<'a>( &'a self, path: &'a DavPath, _credentials: &(), ) -> Pin<Box<dyn Future<Output = Result<(), FsError>> + Send + 'a>>
Create a directory. Read more
Source§fn remove_dir<'a>(
&'a self,
path: &'a DavPath,
_credentials: &(),
) -> Pin<Box<dyn Future<Output = Result<(), FsError>> + Send + 'a>>
fn remove_dir<'a>( &'a self, path: &'a DavPath, _credentials: &(), ) -> Pin<Box<dyn Future<Output = Result<(), FsError>> + Send + 'a>>
Remove a directory. Read more
Source§fn remove_file<'a>(
&'a self,
path: &'a DavPath,
_credentials: &(),
) -> Pin<Box<dyn Future<Output = Result<(), FsError>> + Send + 'a>>
fn remove_file<'a>( &'a self, path: &'a DavPath, _credentials: &(), ) -> Pin<Box<dyn Future<Output = Result<(), FsError>> + Send + 'a>>
Remove a file. Read more
Source§fn rename<'a>(
&'a self,
from: &'a DavPath,
to: &'a DavPath,
_credentials: &(),
) -> Pin<Box<dyn Future<Output = Result<(), FsError>> + Send + 'a>>
fn rename<'a>( &'a self, from: &'a DavPath, to: &'a DavPath, _credentials: &(), ) -> Pin<Box<dyn Future<Output = Result<(), FsError>> + Send + 'a>>
Rename a file or directory. Read more
Source§fn copy<'a>(
&'a self,
from: &'a DavPath,
to: &'a DavPath,
_credentials: &(),
) -> Pin<Box<dyn Future<Output = Result<(), FsError>> + Send + 'a>>
fn copy<'a>( &'a self, from: &'a DavPath, to: &'a DavPath, _credentials: &(), ) -> Pin<Box<dyn Future<Output = Result<(), FsError>> + Send + 'a>>
Copy a file. Read more
fn set_accessed<'a>( &'a self, path: &'a DavPath, tm: SystemTime, _credentials: &(), ) -> Pin<Box<dyn Future<Output = Result<(), FsError>> + Send + 'a>>
fn set_modified<'a>( &'a self, path: &'a DavPath, tm: SystemTime, _credentials: &(), ) -> Pin<Box<dyn Future<Output = Result<(), FsError>> + Send + 'a>>
Source§fn have_props<'a>(
&'a self,
path: &'a DavPath,
_credentials: &(),
) -> Pin<Box<dyn Future<Output = bool> + Send + 'a>>
fn have_props<'a>( &'a self, path: &'a DavPath, _credentials: &(), ) -> Pin<Box<dyn Future<Output = bool> + Send + 'a>>
Indicator that tells if this filesystem driver supports DAV properties. Read more
Source§fn patch_props<'a>(
&'a self,
path: &'a DavPath,
patch: Vec<(bool, DavProp)>,
_credentials: &(),
) -> Pin<Box<dyn Future<Output = Result<Vec<(StatusCode, DavProp)>, FsError>> + Send + 'a>>
fn patch_props<'a>( &'a self, path: &'a DavPath, patch: Vec<(bool, DavProp)>, _credentials: &(), ) -> Pin<Box<dyn Future<Output = Result<Vec<(StatusCode, DavProp)>, FsError>> + Send + 'a>>
Patch the DAV properties of a node (add/remove props). Read more
Source§fn get_props<'a>(
&'a self,
path: &'a DavPath,
do_content: bool,
_credentials: &(),
) -> Pin<Box<dyn Future<Output = Result<Vec<DavProp>, FsError>> + Send + 'a>>
fn get_props<'a>( &'a self, path: &'a DavPath, do_content: bool, _credentials: &(), ) -> Pin<Box<dyn Future<Output = Result<Vec<DavProp>, FsError>> + Send + 'a>>
List/get the DAV properties of a node. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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