Trait restless_core::data::Encodable
source · 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.