Struct dav_server::DavConfig

source ·
pub struct DavConfig { /* private fields */ }
Expand description

Configuration of the handler.

Implementations§

source§

impl DavConfig

source

pub fn new() -> DavConfig

Create a new configuration builder.

source

pub fn build_handler(self) -> DavHandler

Use the configuration that was built to generate a DavConfig.

source

pub fn strip_prefix(self, prefix: impl Into<String>) -> Self

Prefix to be stripped off before translating the rest of the request path to a filesystem path.

source

pub fn filesystem(self, fs: Box<dyn DavFileSystem>) -> Self

Set the filesystem to use.

source

pub fn locksystem(self, ls: Box<dyn DavLockSystem>) -> Self

Set the locksystem to use.

source

pub fn methods(self, allow: DavMethodSet) -> Self

Which methods to allow (default is all methods).

source

pub fn principal(self, principal: impl Into<String>) -> Self

Set the name of the “webdav principal”. This will be the owner of any created locks.

Hide symbolic links (default is true)

source

pub fn autoindex(self, autoindex: bool) -> Self

Does a GET on a directory produce a directory index.

source

pub fn indexfile(self, indexfile: impl Into<String>) -> Self

Indexfile to show (index.html, usually).

source

pub fn read_buf_size(self, size: usize) -> Self

Read buffer size in bytes

source

pub fn redirect(self, redirect: bool) -> Self

Trait Implementations§

source§

impl Default for DavConfig

source§

fn default() -> DavConfig

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more