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>
pub async fn start_request(
&self,
method: Method,
path: &str
) -> Result<RequestBuilder>
Main function that creates the RequestBuilder, sets the method, url and the basic_auth
sourcepub async fn get(&self, path: &str) -> Result<Response>
pub async fn get(&self, path: &str) -> Result<Response>
Get a file from Webdav server
Use absolute path to the webdav server file location
sourcepub async fn put<B: Into<Body>>(&self, path: &str, body: B) -> Result<Response>
pub async fn put<B: Into<Body>>(&self, path: &str, body: B) -> Result<Response>
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
sourcepub async fn delete(&self, path: &str) -> Result<Response>
pub async fn delete(&self, path: &str) -> Result<Response>
Deletes the collection, file, folder or zip archive at the given path on Webdav server
Use absolute path to the webdav server file location
sourcepub async fn mkcol(&self, path: &str) -> Result<Response>
pub async fn mkcol(&self, path: &str) -> Result<Response>
Creates a directory on Webdav server
Use absolute path to the webdav server file location
sourcepub async fn unzip(&self, path: &str) -> Result<Response>
pub async fn unzip(&self, path: &str) -> Result<Response>
Unzips the .zip archieve on Webdav server
Use absolute path to the webdav server file location
sourcepub async fn mv(&self, from: &str, to: &str) -> Result<Response>
pub async fn mv(&self, from: &str, to: &str) -> Result<Response>
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
sourcepub async fn list(&self, path: &str, depth: Depth) -> Result<Response>
pub async fn list(&self, path: &str, depth: Depth) -> Result<Response>
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>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more