pub struct Ipmfs { /* private fields */ }
Expand description
IPFS file system support based on IPFS MFS API.
Capabilities
This service can be used to:
- read
- write
- list
-
scan - presign
- blocking
Configuration
root
: Set the work directory for backendendpoint
: Customizable endpoint setting
You can refer to IpmfsBuilder
’s docs for more information
Example
Via Builder
use anyhow::Result;
use opendal::services::Ipmfs;
use opendal::Operator;
#[tokio::main]
async fn main() -> Result<()> {
// create backend builder
let mut builder = Ipmfs::default();
// set the storage bucket for OpenDAL
builder.endpoint("http://127.0.0.1:5001");
let op: Operator = Operator::new(builder)?.finish();
Ok(())
}
Implementations§
source§impl IpmfsBuilder
impl IpmfsBuilder
sourcepub fn endpoint(&mut self, endpoint: &str) -> &mut Self
pub fn endpoint(&mut self, endpoint: &str) -> &mut Self
Set endpoint for ipfs.
Default: http://localhost:5001
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 IpmfsBuilder
impl Builder for IpmfsBuilder
source§impl Debug for IpmfsBuilder
impl Debug for IpmfsBuilder
source§impl Default for IpmfsBuilder
impl Default for IpmfsBuilder
source§fn default() -> IpmfsBuilder
fn default() -> IpmfsBuilder
Returns the “default value” for a type. Read more