Struct actix_web::Extensions [−][src]
pub struct Extensions { /* fields omitted */ }A type map of request extensions.
Methods
impl Extensions[src]
impl Extensionspub fn insert<T: 'static>(&mut self, val: T)[src]
pub fn insert<T: 'static>(&mut self, val: T)Insert a type into this Extensions.
If a extension of this type already existed, it will be returned.
pub fn get<T: 'static>(&self) -> Option<&T>[src]
pub fn get<T: 'static>(&self) -> Option<&T>Get a reference to a type previously inserted on this Extensions.
pub fn get_mut<T: 'static>(&mut self) -> Option<&mut T>[src]
pub fn get_mut<T: 'static>(&mut self) -> Option<&mut T>Get a mutable reference to a type previously inserted on this Extensions.
pub fn remove<T: 'static>(&mut self) -> Option<T>[src]
pub fn remove<T: 'static>(&mut self) -> Option<T>Remove a type from this Extensions.
If a extension of this type existed, it will be returned.
pub fn clear(&mut self)[src]
pub fn clear(&mut self)Clear the Extensions of all inserted extensions.
Trait Implementations
impl Debug for Extensions[src]
impl Debug for ExtensionsAuto Trait Implementations
impl !Send for Extensions
impl !Send for Extensionsimpl !Sync for Extensions
impl !Sync for Extensions