[][src]Struct webdav_handler::DavHandler

pub struct DavHandler { /* fields omitted */ }

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]

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]

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]

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]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self