Type Definition rocket::request::FlashMessage

source · []
pub type FlashMessage<'a> = Flash<&'a CookieJar<'a>>;
Expand description

Type alias to retrieve Flash messages from a request.

A FlashMessage holds the parsed contents of the flash cookie. As long as there is a flash cookie present (set by the Flash Responder), a FlashMessage request guard will succeed.

The flash cookie is cleared if either the kind() or message() method is called. If neither method is called, the flash cookie is not cleared.


Returns a tuple of (kind, message), consuming self.

Returns the kind of this message.

Returns the message contents of this message.

Trait Implementations

Retrieves a flash message from a flash cookie. If there is no flash cookie, or if the flash cookie is malformed, an empty Err is returned.

The suggested use is through an Option and the FlashMessage type alias in request: Option<FlashMessage>.

The associated error to be returned if derivation fails.

Derives an instance of Self from the incoming request metadata. Read more

Serialize this value into the given Serde serializer. Read more