pub enum ClientEvent {
Connect,
Reauth,
Established,
Disconnect,
CrResponse(String),
Unknown(String),
}Expand description
The sub-type of a >CLIENT: notification.
Variants§
Connect
A new client is connecting (>CLIENT:CONNECT).
Reauth
An existing client is re-authenticating (>CLIENT:REAUTH).
Established
A client connection has been fully established (>CLIENT:ESTABLISHED).
Disconnect
A client has disconnected (>CLIENT:DISCONNECT).
CrResponse(String)
A client challenge-response (>CLIENT:CR_RESPONSE,{CID},{KID},{base64}).
The base64-encoded response is carried inline because it appears as the third comma-separated field on the header line (after CID and KID), not in the ENV block. Both cedws/openvpn-mgmt-go and jkroepke/openvpn-auth-oauth2 handle this as a distinct event type.
Unknown(String)
An unrecognized event type (forward compatibility).
Trait Implementations§
Source§impl Clone for ClientEvent
impl Clone for ClientEvent
Source§fn clone(&self) -> ClientEvent
fn clone(&self) -> ClientEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ClientEvent
impl Debug for ClientEvent
Source§impl Display for ClientEvent
impl Display for ClientEvent
impl Eq for ClientEvent
Source§impl FromStr for ClientEvent
impl FromStr for ClientEvent
Source§fn from_str(input: &str) -> Result<Self, Self::Err>
fn from_str(input: &str) -> Result<Self, Self::Err>
Parse a recognized client event string.
Recognized values: CONNECT, REAUTH, ESTABLISHED, DISCONNECT.
Returns Err for anything else — use ClientEvent::Unknown
explicitly if forward-compatible fallback is desired.
Note: CR_RESPONSE is handled separately in the codec because it
carries an inline base64 field; it is not recognized by FromStr.