Struct dav_server::DavConfig
source · pub struct DavConfig { /* private fields */ }Expand description
Configuration of the handler.
Implementations§
source§impl DavConfig
impl DavConfig
sourcepub fn build_handler(self) -> DavHandler
pub fn build_handler(self) -> DavHandler
Use the configuration that was built to generate a DavConfig.
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 DavFileSystem>) -> Self
pub fn filesystem(self, fs: Box<dyn DavFileSystem>) -> 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 !RefUnwindSafe for DavConfig
impl Send for DavConfig
impl Sync for DavConfig
impl Unpin for DavConfig
impl !UnwindSafe for DavConfig
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