Struct tower_web::response::DefaultSerializer [−][src]
pub struct DefaultSerializer<T = ()> { /* fields omitted */ }
Default serializer
Serializes responses into one of a number of common HTTP formats.
Methods
impl DefaultSerializer[src]
impl DefaultSerializerpub fn new() -> DefaultSerializer[src]
pub fn new() -> DefaultSerializerReturn a new DefaultSerializer value.
Trait Implementations
impl<T: Debug> Debug for DefaultSerializer<T>[src]
impl<T: Debug> Debug for DefaultSerializer<T>fn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<T: Clone> Clone for DefaultSerializer<T>[src]
impl<T: Clone> Clone for DefaultSerializer<T>fn clone(&self) -> DefaultSerializer<T>[src]
fn clone(&self) -> DefaultSerializer<T>Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl<T> Serializer for DefaultSerializer<T> where
T: Serializer, [src]
impl<T> Serializer for DefaultSerializer<T> where
T: Serializer, type Format = Either2<T::Format, Format>
A token used by Serializer implementations to identify the specific serialization format to use when encoding a value. Read more
fn lookup(&self, name: &str) -> Option<ContentType<Self::Format>>[src]
fn lookup(&self, name: &str) -> Option<ContentType<Self::Format>>Lookup a serializer and HeaderValue for the given Content-Type string. Read more
fn serialize<V>(
&self,
value: &V,
format: &Self::Format,
ctx: &SerializerContext
) -> Result<Bytes, Error> where
V: Serialize, [src]
fn serialize<V>(
&self,
value: &V,
format: &Self::Format,
ctx: &SerializerContext
) -> Result<Bytes, Error> where
V: Serialize, Serialize the value using the specified format.
impl<T, U> Chain<U> for DefaultSerializer<T>[src]
impl<T, U> Chain<U> for DefaultSerializer<T>Auto Trait Implementations
impl<T> Send for DefaultSerializer<T> where
T: Send,
impl<T> Send for DefaultSerializer<T> where
T: Send, impl<T> Sync for DefaultSerializer<T> where
T: Sync,
impl<T> Sync for DefaultSerializer<T> where
T: Sync,