pub struct Webdav { /* private fields */ }
Expand description
WebDAV backend support.
Capabilities
This service can be used to:
- read
- write
- list
-
scan -
presign - blocking
Notes
Bazel Remote Caching and Ccache HTTP Storage is also part of this service.
Users can use webdav
to connect those services.
Configuration
endpoint
: set the endpoint for webdavroot
: Set the work directory for backend
You can refer to WebdavBuilder
’s docs for more information
Example
Via Builder
use anyhow::Result;
use opendal::services::Webdav;
use opendal::Operator;
#[tokio::main]
async fn main() -> Result<()> {
// create backend builder
let mut builder = Webdav::default();
builder
.endpoint("127.0.0.1")
.username("xxx")
.password("xxx");
let op: Operator = Operator::new(builder)?.finish();
Ok(())
}
Implementations§
source§impl WebdavBuilder
impl WebdavBuilder
sourcepub fn endpoint(&mut self, endpoint: &str) -> &mut Self
pub fn endpoint(&mut self, endpoint: &str) -> &mut Self
Set endpoint for http backend.
For example: https://example.com
sourcepub fn username(&mut self, username: &str) -> &mut Self
pub fn username(&mut self, username: &str) -> &mut Self
set the password for Webdav
default: no password
sourcepub fn password(&mut self, password: &str) -> &mut Self
pub fn password(&mut self, password: &str) -> &mut Self
set the password for Webdav
default: no password
sourcepub fn token(&mut self, token: &str) -> &mut Self
pub fn token(&mut self, token: &str) -> &mut Self
set the bearer token for Webdav
default: no access token
sourcepub fn http_client(&mut self, client: HttpClient) -> &mut Self
pub fn http_client(&mut self, client: HttpClient) -> &mut Self
Specify the http client that used by this service.
Notes
This API is part of OpenDAL’s Raw API. HttpClient
could be changed
during minor updates.
Trait Implementations§
source§impl Builder for WebdavBuilder
impl Builder for WebdavBuilder
source§impl Debug for WebdavBuilder
impl Debug for WebdavBuilder
source§impl Default for WebdavBuilder
impl Default for WebdavBuilder
source§fn default() -> WebdavBuilder
fn default() -> WebdavBuilder
Returns the “default value” for a type. Read more