Struct actix_web_flash_messages::IncomingFlashMessages [−][src]
pub struct IncomingFlashMessages { /* fields omitted */ }
Expand description
An actix-web
extractor to retrieve FlashMessage
s attached to an incoming request.
use actix_web::{Responder, HttpResponse, get};
use actix_web_flash_messages::IncomingFlashMessages;
#[get("/show")]
async fn show(messages: IncomingFlashMessages) -> impl Responder {
for message in messages.iter() {
println!("{} - {}", message.content(), message.level());
}
HttpResponse::Ok()
}
This method will panic if FlashMessagesFramework
has not been registered as a middleware.
Implementations
Return an iterator over incoming FlashMessage
s.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Create a Self from request parts asynchronously.
Create a Self from request head asynchronously. Read more
Auto Trait Implementations
impl RefUnwindSafe for IncomingFlashMessages
impl Send for IncomingFlashMessages
impl Sync for IncomingFlashMessages
impl Unpin for IncomingFlashMessages
impl UnwindSafe for IncomingFlashMessages
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more