[−][src]Struct webdav_handler::DavHandler
The webdav handler struct.
Methods
impl DavHandler
[src]
pub fn new(
prefix: Option<&str>,
fs: Box<dyn DavFileSystem>,
ls: Option<Box<dyn DavLockSystem>>
) -> DavHandler
[src]
prefix: Option<&str>,
fs: Box<dyn DavFileSystem>,
ls: Option<Box<dyn DavLockSystem>>
) -> DavHandler
Create a new DavHandler
.
prefix
: URL prefix to be stripped off.fs:
The filesystem backend.ls:
Optional locksystem backend
pub fn new_with(config: DavConfig) -> DavHandler
[src]
Create a new DavHandler
with a more detailed configuration.
For example, pass in a specific AllowedMethods
set.
pub async fn handle<'_, ReqBody, ReqData, ReqError>(
&'_ self,
req: Request<ReqBody>
) -> Result<Response<Body>> where
ReqData: Buf + Send,
ReqError: StdError + Send + Sync + 'static,
ReqBody: Body<Data = ReqData, Error = ReqError> + Send,
[src]
&'_ self,
req: Request<ReqBody>
) -> Result<Response<Body>> where
ReqData: Buf + Send,
ReqError: StdError + Send + Sync + 'static,
ReqBody: Body<Data = ReqData, Error = ReqError> + Send,
Handle a webdav request.
Only one error kind is ever returned: ErrorKind::BrokenPipe
. In that case we
were not able to generate a response at all, and the server should just
close the connection.
pub async fn handle_with<'_, ReqBody, ReqData, ReqError>(
&'_ self,
config: DavConfig,
req: Request<ReqBody>
) -> Result<Response<Body>> where
ReqData: Buf + Send,
ReqError: StdError + Send + Sync + 'static,
ReqBody: Body<Data = ReqData, Error = ReqError> + Send,
[src]
&'_ self,
config: DavConfig,
req: Request<ReqBody>
) -> Result<Response<Body>> where
ReqData: Buf + Send,
ReqError: StdError + Send + Sync + 'static,
ReqBody: Body<Data = ReqData, Error = ReqError> + Send,
Handle a webdav request, overriding parts of the config.
For example, the principal
can be set for this request.
Or, the default config has no locksystem, and you pass in
a fake locksystem (FakeLs
) because this is a request from a
windows or osx client that needs to see locking support.
Trait Implementations
impl Clone for DavHandler
[src]
fn clone(&self) -> DavHandler
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl Send for DavHandler
impl Sync for DavHandler
impl Unpin for DavHandler
impl !UnwindSafe for DavHandler
impl !RefUnwindSafe for DavHandler
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self