Trait retina_datatypes::FromSession
source · pub trait FromSession {
// Required methods
fn stream_protocols() -> Vec<&'static str>;
fn from_session(session: &Session) -> Option<&Self>;
fn from_sessionlist(sessionlist: &SessionList) -> Option<&Self>;
}
Expand description
Trait implemented by datatypes that are built from session data. This is used when subscribing to specific parsed application-layer data.
Required Methods§
sourcefn stream_protocols() -> Vec<&'static str>
fn stream_protocols() -> Vec<&'static str>
The stream protocols (lower-case) required for this datatype.
See IMPLEMENTED_PROTOCOLS
in retina_core for list of supported protocols.
sourcefn from_session(session: &Session) -> Option<&Self>
fn from_session(session: &Session) -> Option<&Self>
Build Self from a parsed session, or return None if impossible. Invoked when the session is fully matched, parsed, and ready to be delivered to a callback.
sourcefn from_sessionlist(sessionlist: &SessionList) -> Option<&Self>
fn from_sessionlist(sessionlist: &SessionList) -> Option<&Self>
Build Self from a list of sessions, or return None if impossible. Invoked when the connection has terminated and a FromSession datatype must be delivered to a callback.
Object Safety§
This trait is not object safe.