pub struct Server { /* private fields */ }
Implementations§
Source§impl Server
impl Server
Sourcepub fn new<U, R>(url_prefix: U, srv_root: R) -> Self
pub fn new<U, R>(url_prefix: U, srv_root: R) -> Self
Create a WebDAV handler
-
url_prefix
- the path on the server that maps to the WebDAV root. It must not end with trailing slashes. -
srv_root
- must be a directory on the host and must end with a trailing slash.
Panics if the above requirements are not met. These requirements are desired to consistently map between server URLs and host file system paths. Since the server returns URLs for files, the mapping must be consistent in both directions.
Ex. url_prefix = “/dav”, srv_root = Path::new(“/srv/dav/”)
Trait Implementations§
Source§impl Handler for Server
impl Handler for Server
Source§fn check_continue(&self, _: (&Method, &RequestUri, &Headers)) -> StatusCode
fn check_continue(&self, _: (&Method, &RequestUri, &Headers)) -> StatusCode
Called when a Request includes a
Expect: 100-continue
header. Read moreSource§fn on_connection_start(&self)
fn on_connection_start(&self)
This is run after a connection is received, on a per-connection basis (not a
per-request basis, as a connection with keep-alive may handle multiple
requests)
Source§fn on_connection_end(&self)
fn on_connection_end(&self)
This is run before a connection is closed, on a per-connection basis (not a
per-request basis, as a connection with keep-alive may handle multiple
requests)
Auto Trait Implementations§
impl Freeze for Server
impl RefUnwindSafe for Server
impl Send for Server
impl Sync for Server
impl Unpin for Server
impl UnwindSafe for Server
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