pub struct SerializerContext<'a> { /* private fields */ }Expand description
Context passed to Serializer::serialize
SerializerContext contains context obtained when deriving Response.
Implementations§
Source§impl<'a> SerializerContext<'a>
impl<'a> SerializerContext<'a>
Sourcepub fn resource_mod(&self) -> Option<&str>
pub fn resource_mod(&self) -> Option<&str>
Returns the module in which the impl_web! was used to implement the resource.
Sourcepub fn resource_name(&self) -> Option<&str>
pub fn resource_name(&self) -> Option<&str>
Returns the name of the resource handling the request.
Sourcepub fn handler_name(&self) -> Option<&str>
pub fn handler_name(&self) -> Option<&str>
Returns the name of the function handling the request.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for SerializerContext<'a>
impl<'a> !RefUnwindSafe for SerializerContext<'a>
impl<'a> Send for SerializerContext<'a>
impl<'a> Sync for SerializerContext<'a>
impl<'a> Unpin for SerializerContext<'a>
impl<'a> !UnwindSafe for SerializerContext<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more