[−][src]Enum openvpn_plugin::EventResult
Enum representing the results an OpenVPN plugin can return from an event callback.
Variants
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.
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.
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]
pub fn clone(&self) -> EventResult
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for EventResult
[src]
impl Debug for EventResult
[src]
impl Eq for EventResult
[src]
impl Hash for EventResult
[src]
pub fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<EventResult> for EventResult
[src]
pub fn eq(&self, other: &EventResult) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for EventResult
[src]
impl StructuralPartialEq for EventResult
[src]
Auto Trait Implementations
impl RefUnwindSafe for EventResult
[src]
impl Send for EventResult
[src]
impl Sync for EventResult
[src]
impl Unpin for EventResult
[src]
impl UnwindSafe for EventResult
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,