pub trait VpnServicePluginExt: IsA<VpnServicePlugin> + 'static {
Show 14 methods
// Provided methods
fn disconnect(&self) -> Result<(), Error> { ... }
fn failure(&self, reason: VpnPluginFailure) { ... }
fn secrets_required(&self, message: &str, hints: &str) { ... }
fn set_login_banner(&self, banner: &str) { ... }
fn shutdown(&self) { ... }
fn service_name(&self) -> Option<GString> { ... }
fn state(&self) -> VpnServiceState { ... }
fn set_state(&self, state: VpnServiceState) { ... }
fn is_watch_peer(&self) -> bool { ... }
fn connect_failure<F: Fn(&Self, u32) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_login_banner<F: Fn(&Self, &str) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_quit<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { ... }
fn connect_state_changed<F: Fn(&Self, u32) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_state_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
}v1_2 only.Expand description
Provided Methods§
fn disconnect(&self) -> Result<(), Error>
fn failure(&self, reason: VpnPluginFailure)
Sourcefn secrets_required(&self, message: &str, hints: &str)
fn secrets_required(&self, message: &str, hints: &str)
Called by VPN plugin implementations to signal to NetworkManager that secrets are required during the connection process. This signal may be used to request new secrets when the secrets originally provided by NetworkManager are insufficient, or the VPN process indicates that it needs additional information to complete the request.
§message
an information message about why secrets are required, if any
§hints
VPN specific secret names for required new secrets
Sourcefn shutdown(&self)
Available on crate feature v1_12 only.
fn shutdown(&self)
v1_12 only.Shutdown the @self and disconnect from D-Bus. After this, the plugin instance is dead and should no longer be used. It ensures to get no more requests from D-Bus. In principle, you don’t need to shutdown the plugin, disposing the instance has the same effect. However, this gives a way to deactivate the plugin before giving up the last reference.
Sourcefn service_name(&self) -> Option<GString>
fn service_name(&self) -> Option<GString>
The D-Bus service name of this plugin.
Sourcefn state(&self) -> VpnServiceState
fn state(&self) -> VpnServiceState
The state of the plugin.
Sourcefn set_state(&self, state: VpnServiceState)
fn set_state(&self, state: VpnServiceState)
The state of the plugin.
Sourcefn is_watch_peer(&self) -> bool
fn is_watch_peer(&self) -> bool
Whether to watch for D-Bus peer’s changes.
fn connect_failure<F: Fn(&Self, u32) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_quit<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_state_changed<F: Fn(&Self, u32) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_state_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.