Struct dav_server::DavHandler
source · pub struct DavHandler { /* private fields */ }
Expand description
The webdav handler struct.
The new
and build
etc methods are used to instantiate a handler.
The handle
and handle_with
methods are the methods that do the actual work.
Implementations§
source§impl DavHandler
impl DavHandler
sourcepub fn new() -> DavHandler
pub fn new() -> DavHandler
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<ReqBody, ReqData, ReqError>(
&self,
req: Request<ReqBody>
) -> Response<Body>
pub async fn handle<ReqBody, ReqData, ReqError>( &self, req: Request<ReqBody> ) -> Response<Body>
Handle a webdav request.
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 Clone for DavHandler
impl Clone for DavHandler
source§fn clone(&self) -> DavHandler
fn clone(&self) -> DavHandler
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more