pub struct DavHandler<C = ()> { /* private fields */ }
Expand description
WebDAV request handler.
The new
and builder
methods are used to instantiate a handler.
The handle
and handle_with
methods do the actual work.
Type parameter C
represents credentials for file systems with access control.
Implementations§
Source§impl<C: Clone + Send + Sync + 'static> DavHandler<C>
impl<C: Clone + Send + Sync + 'static> DavHandler<C>
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new DavHandler
.
This returns a DavHandler with an empty configuration. That’s only
useful if you use the handle_with
method instead of handle
.
Normally you should create a new DavHandler
using DavHandler::build
and configure at least the filesystem, and probably the strip_prefix.
Sourcepub async fn handle_guarded<ReqBody, ReqData, ReqError>(
&self,
req: Request<ReqBody>,
credentials: C,
) -> Response<Body>
pub async fn handle_guarded<ReqBody, ReqData, ReqError>( &self, req: Request<ReqBody>, credentials: C, ) -> Response<Body>
Process a WebDAV request to a file system with access control.
Source§impl DavHandler
impl DavHandler
Sourcepub async fn handle<ReqBody, ReqData, ReqError>(
&self,
req: Request<ReqBody>,
) -> Response<Body>
pub async fn handle<ReqBody, ReqData, ReqError>( &self, req: Request<ReqBody>, ) -> Response<Body>
Process a WebDAV request to a file system without access control.
Sourcepub async fn handle_with<ReqBody, ReqData, ReqError>(
&self,
config: DavConfig,
req: Request<ReqBody>,
) -> Response<Body>
pub async fn handle_with<ReqBody, ReqData, ReqError>( &self, config: DavConfig, req: Request<ReqBody>, ) -> Response<Body>
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 macos client that needs to see locking support.
Trait Implementations§
Source§impl<C: Clone> Clone for DavHandler<C>
impl<C: Clone> Clone for DavHandler<C>
Source§fn clone(&self) -> DavHandler<C>
fn clone(&self) -> DavHandler<C>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more