[][src]Enum openvpn_plugin::EventResult

pub enum EventResult {
    Success,
    Deferred,
    Failure,
}

Enum representing the results an OpenVPN plugin can return from an event callback.

Variants

Success

Will return OPENVPN_PLUGIN_FUNC_SUCCESS to OpenVPN. Indicates that the plugin marks the event as a success. This means an auth is approved or similar, depending on which type of event.

Deferred

Will return OPENVPN_PLUGIN_FUNC_DEFERRED to OpenVPN. WARNING: Can only be returned from the EventType::AuthUserPassVerify (OPENVPN_PLUGIN_AUTH_USER_PASS_VERIFY) event. No other events may return this variant. Returning this tells OpenVPN to continue its normal work and that the decision on if the authentication is accepted or not will be delivered later, via writing to the path under the auth_control_file environment variable.

Failure

Will return OPENVPN_PLUGIN_FUNC_ERROR to OpenVPN. Both returning Ok(EventResult::Failure) and Err(e) from a callback will result in OPENVPN_PLUGIN_FUNC_ERROR being returned to OpenVPN. The difference being that an Err(e) will also log the error e. This variant is intended for when the plugin did not encounter an error, but the event is a failure or is to be declined. Intended to be used to decline an authentication request and similar.

Trait Implementations

impl Clone for EventResult[src]

impl Copy for EventResult[src]

impl Debug for EventResult[src]

impl Eq for EventResult[src]

impl Hash for EventResult[src]

impl PartialEq<EventResult> for EventResult[src]

impl StructuralEq for EventResult[src]

impl StructuralPartialEq for EventResult[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.