pub struct DavConfig<C = ()> { /* private fields */ }
Expand description
Configuration of the handler.
Implementations§
Source§impl<C> DavConfig<C>
impl<C> DavConfig<C>
Sourcepub fn build_handler(self) -> DavHandler<C>
pub fn build_handler(self) -> DavHandler<C>
Use the configuration that was built to generate a DavHandler
.
Sourcepub fn strip_prefix(self, prefix: impl Into<String>) -> Self
pub fn strip_prefix(self, prefix: impl Into<String>) -> Self
Prefix to be stripped off before translating the rest of the request path to a filesystem path.
Sourcepub fn filesystem(self, fs: Box<dyn GuardedFileSystem<C>>) -> Self
pub fn filesystem(self, fs: Box<dyn GuardedFileSystem<C>>) -> Self
Set the filesystem to use.
Sourcepub fn locksystem(self, ls: Box<dyn DavLockSystem>) -> Self
pub fn locksystem(self, ls: Box<dyn DavLockSystem>) -> Self
Set the locksystem to use.
Sourcepub fn methods(self, allow: DavMethodSet) -> Self
pub fn methods(self, allow: DavMethodSet) -> Self
Which methods to allow (default is all methods).
Sourcepub fn principal(self, principal: impl Into<String>) -> Self
pub fn principal(self, principal: impl Into<String>) -> Self
Set the name of the “webdav principal”. This will be the owner of any created locks.
Sourcepub fn hide_symlinks(self, hide: bool) -> Self
pub fn hide_symlinks(self, hide: bool) -> Self
Hide symbolic links (default is true)
Sourcepub fn autoindex(self, autoindex: bool) -> Self
pub fn autoindex(self, autoindex: bool) -> Self
Does a GET on a directory produce a directory index.
Sourcepub fn indexfile(self, indexfile: impl Into<String>) -> Self
pub fn indexfile(self, indexfile: impl Into<String>) -> Self
Indexfile to show (index.html, usually).
Sourcepub fn read_buf_size(self, size: usize) -> Self
pub fn read_buf_size(self, size: usize) -> Self
Read buffer size in bytes
pub fn redirect(self, redirect: bool) -> Self
Trait Implementations§
Auto Trait Implementations§
impl<C> Freeze for DavConfig<C>
impl<C = ()> !RefUnwindSafe for DavConfig<C>
impl<C> Send for DavConfig<C>
impl<C> Sync for DavConfig<C>
impl<C> Unpin for DavConfig<C>
impl<C = ()> !UnwindSafe for DavConfig<C>
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