Struct reqwest_dav::Client
source · [−]pub struct Client {
pub agent: Client,
pub host: String,
pub auth: Auth,
pub digest_auth: Arc<Mutex<Option<WwwAuthenticateHeader>>>,
}
Fields
agent: Client
host: String
auth: Auth
digest_auth: Arc<Mutex<Option<WwwAuthenticateHeader>>>
Implementations
sourceimpl Client
impl Client
sourcepub async fn start_request(
&self,
method: Method,
path: &str
) -> Result<RequestBuilder, Error>
pub async fn start_request(
&self,
method: Method,
path: &str
) -> Result<RequestBuilder, Error>
Main function that creates the RequestBuilder, sets the method, url and the basic_auth
pub async fn get_raw(&self, path: &str) -> Result<Response, Error>
sourcepub async fn get(&self, path: &str) -> Result<Response, Error>
pub async fn get(&self, path: &str) -> Result<Response, Error>
Get a file from Webdav server
Use absolute path to the webdav server file location
pub async fn put_raw<B: Into<Body>>(
&self,
path: &str,
body: B
) -> Result<Response, Error>
sourcepub async fn put<B: Into<Body>>(&self, path: &str, body: B) -> Result<(), Error>
pub async fn put<B: Into<Body>>(&self, path: &str, body: B) -> Result<(), Error>
Upload a file/zip on Webdav server
It can be any type of file as long as it is transformed to a vector of bytes (Vec
Use absolute path to the webdav server folder location
pub async fn delete_raw(&self, path: &str) -> Result<Response, Error>
sourcepub async fn delete(&self, path: &str) -> Result<(), Error>
pub async fn delete(&self, path: &str) -> Result<(), Error>
Deletes the collection, file, folder or zip archive at the given path on Webdav server
Use absolute path to the webdav server file location
pub async fn mkcol_raw(&self, path: &str) -> Result<Response, Error>
sourcepub async fn mkcol(&self, path: &str) -> Result<(), Error>
pub async fn mkcol(&self, path: &str) -> Result<(), Error>
Creates a directory on Webdav server
Use absolute path to the webdav server file location
pub async fn unzip_raw(&self, path: &str) -> Result<Response, Error>
sourcepub async fn unzip(&self, path: &str) -> Result<(), Error>
pub async fn unzip(&self, path: &str) -> Result<(), Error>
Unzips the .zip archieve on Webdav server
Use absolute path to the webdav server file location
pub async fn mv_raw(&self, from: &str, to: &str) -> Result<Response, Error>
sourcepub async fn mv(&self, from: &str, to: &str) -> Result<(), Error>
pub async fn mv(&self, from: &str, to: &str) -> Result<(), Error>
Rename or move a collection, file, folder on Webdav server
If the file location changes it will move the file, if only the file name changes it will rename it.
Use absolute path to the webdav server file location
pub async fn list_raw(&self, path: &str, depth: Depth) -> Result<Response, Error>
pub async fn list_rsp(
&self,
path: &str,
depth: Depth
) -> Result<Vec<ListResponse>, Error>
sourcepub async fn list(
&self,
path: &str,
depth: Depth
) -> Result<Vec<ListEntity>, Error>
pub async fn list(
&self,
path: &str,
depth: Depth
) -> Result<Vec<ListEntity>, Error>
List files and folders at the given path on Webdav server
Depth of “0” applies only to the resource, “1” to the resource and it’s children, “infinity” to the resource and all it’s children recursively The result will contain an xml list with the remote folder contents.
Use absolute path to the webdav server folder location
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourcefn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
T: Future, type Output = <T as Future>::Output;
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
fn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more