Type Alias jsonrpsee_http_client::HttpBody

source ·
pub type HttpBody = Body;
Expand description

Default HTTP body for the client.

Aliased Type§

struct HttpBody(/* private fields */);

Implementations

source§

impl Body

source

pub fn empty() -> Body

Create an empty body.

source

pub fn new<B>(body: B) -> Body
where B: Body<Data = Bytes> + Send + 'static, <B as Body>::Data: Send + 'static, <B as Body>::Error: Into<Box<dyn Error + Send + Sync>>,

Create a new body.

Trait Implementations

source§

impl Body for Body

§

type Data = Bytes

Values yielded by the Body.
§

type Error = Box<dyn Error + Send + Sync>

The error type this Body might generate.
source§

fn poll_frame( self: Pin<&mut Body>, cx: &mut Context<'_>, ) -> Poll<Option<Result<Frame<<Body as Body>::Data>, <Body as Body>::Error>>>

Attempt to pull out the next data buffer of this stream.
source§

fn size_hint(&self) -> SizeHint

Returns the bounds on the remaining length of the stream. Read more
source§

fn is_end_stream(&self) -> bool

Returns true when the end of stream has been reached. Read more
source§

impl Debug for Body

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Default for Body

source§

fn default() -> Body

Returns the “default value” for a type. Read more
source§

impl From<&'static str> for Body

source§

fn from(s: &'static str) -> Body

Converts to this type from the input type.
source§

impl From<String> for Body

source§

fn from(s: String) -> Body

Converts to this type from the input type.
source§

impl From<Vec<u8>> for Body

source§

fn from(bytes: Vec<u8>) -> Body

Converts to this type from the input type.