pub trait Encodable {
// Required method
fn encode(&self) -> Vec<u8> ⓘ;
// Provided methods
fn encode_bytes(&self) -> Bytes { ... }
fn content_type(&self) -> Option<Cow<'_, str>> { ... }
}
Expand description
Determines how a request is encoded.
Required Methods§
Provided Methods§
Sourcefn encode_bytes(&self) -> Bytes
fn encode_bytes(&self) -> Bytes
Encode self into Bytes
.
Sourcefn content_type(&self) -> Option<Cow<'_, str>>
fn content_type(&self) -> Option<Cow<'_, str>>
Content type of this data.