Struct ipfs_api_prelude::BackendWithGlobalOptions [−][src]
pub struct BackendWithGlobalOptions<Back: Backend> { /* fields omitted */ }
Implementations
Trait Implementations
type HttpRequest = Back::HttpRequest
type HttpRequest = Back::HttpRequest
HTTP request type. Read more
type HttpResponse = Back::HttpResponse
type HttpResponse = Back::HttpResponse
HTTP response type. Read more
fn build_base_request<Req>(
&self,
req: &Req,
form: Option<Form<'static>>
) -> Result<Self::HttpRequest, Self::Error> where
Req: ApiRequest,
fn build_base_request<Req>(
&self,
req: &Req,
form: Option<Form<'static>>
) -> Result<Self::HttpRequest, Self::Error> where
Req: ApiRequest,
Builds the url for an api call. Read more
Get the value of a header from an HTTP response. Read more
fn request_raw<'life0, 'async_trait, Req>(
&'life0 self,
req: Req,
form: Option<Form<'static>>
) -> Pin<Box<dyn Future<Output = Result<(StatusCode, Bytes), Self::Error>> + 'async_trait>> where
Req: ApiRequest + Serialize,
Req: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn request_raw<'life0, 'async_trait, Req>(
&'life0 self,
req: Req,
form: Option<Form<'static>>
) -> Pin<Box<dyn Future<Output = Result<(StatusCode, Bytes), Self::Error>> + 'async_trait>> where
Req: ApiRequest + Serialize,
Req: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Generates a request, and returns the unprocessed response future. Read more
fn response_to_byte_stream(
res: Self::HttpResponse
) -> Box<dyn Stream<Item = Result<Bytes, Self::Error>> + Unpin>
fn request_stream<Res, F, OutStream>(
&self,
req: Self::HttpRequest,
process: F
) -> Box<dyn Stream<Item = Result<Res, Self::Error>> + Unpin> where
OutStream: Stream<Item = Result<Res, Self::Error>> + Unpin,
F: 'static + Fn(Self::HttpResponse) -> OutStream,
fn request_stream<Res, F, OutStream>(
&self,
req: Self::HttpRequest,
process: F
) -> Box<dyn Stream<Item = Result<Res, Self::Error>> + Unpin> where
OutStream: Stream<Item = Result<Res, Self::Error>> + Unpin,
F: 'static + Fn(Self::HttpResponse) -> OutStream,
Generic method for making a request that expects back a streaming response. Read more
Builds an Api error from a response body. Read more
fn process_json_response<Res>(
status: StatusCode,
body: Bytes
) -> Result<Res, Self::Error> where
for<'de> Res: 'static + Deserialize<'de>,
fn process_json_response<Res>(
status: StatusCode,
body: Bytes
) -> Result<Res, Self::Error> where
for<'de> Res: 'static + Deserialize<'de>,
Processes a response that expects a json encoded body, returning an error or a deserialized json response. Read more
fn process_stream_response<D, Res>(
res: Self::HttpResponse,
decoder: D
) -> FramedRead<StreamReader<Box<dyn Stream<Item = Result<Bytes, Self::Error>> + Unpin>>, D> where
D: Decoder<Item = Res, Error = Error>,
fn process_stream_response<D, Res>(
res: Self::HttpResponse,
decoder: D
) -> FramedRead<StreamReader<Box<dyn Stream<Item = Result<Bytes, Self::Error>> + Unpin>>, D> where
D: Decoder<Item = Res, Error = Error>,
Processes a response that returns a stream of json deserializable results. Read more
fn request<'life0, 'async_trait, Req, Res>(
&'life0 self,
req: Req,
form: Option<Form<'static>>
) -> Pin<Box<dyn Future<Output = Result<Res, Self::Error>> + 'async_trait>> where
Req: ApiRequest + Serialize,
for<'de> Res: 'static + Deserialize<'de>,
Req: 'async_trait,
Res: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn request<'life0, 'async_trait, Req, Res>(
&'life0 self,
req: Req,
form: Option<Form<'static>>
) -> Pin<Box<dyn Future<Output = Result<Res, Self::Error>> + 'async_trait>> where
Req: ApiRequest + Serialize,
for<'de> Res: 'static + Deserialize<'de>,
Req: 'async_trait,
Res: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Generic method for making a request to the Ipfs server, and getting a deserializable response. Read more
Generic method for making a request to the Ipfs server, and getting back a response with no body. Read more
Generic method for making a request to the Ipfs server, and getting back a raw String response. Read more
fn request_stream_bytes(
&self,
req: Self::HttpRequest
) -> Box<dyn Stream<Item = Result<Bytes, Self::Error>> + Unpin>
fn request_stream_bytes(
&self,
req: Self::HttpRequest
) -> Box<dyn Stream<Item = Result<Bytes, Self::Error>> + Unpin>
Generic method for making a request to the Ipfs server, and getting back a raw stream of bytes. Read more
fn request_stream_json<Res>(
&self,
req: Self::HttpRequest
) -> Box<dyn Stream<Item = Result<Res, Self::Error>> + Unpin> where
for<'de> Res: 'static + Deserialize<'de>,
fn request_stream_json<Res>(
&self,
req: Self::HttpRequest
) -> Box<dyn Stream<Item = Result<Res, Self::Error>> + Unpin> where
for<'de> Res: 'static + Deserialize<'de>,
Generic method to return a streaming response of deserialized json objects delineated by new line separators. Read more
Auto Trait Implementations
impl<Back> RefUnwindSafe for BackendWithGlobalOptions<Back> where
Back: RefUnwindSafe,
impl<Back> Send for BackendWithGlobalOptions<Back> where
Back: Send,
impl<Back> Sync for BackendWithGlobalOptions<Back> where
Back: Sync,
impl<Back> Unpin for BackendWithGlobalOptions<Back> where
Back: Unpin,
impl<Back> UnwindSafe for BackendWithGlobalOptions<Back> where
Back: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more