pub struct Session<'a> { /* private fields */ }
Expand description
OpenVPN 3 Session
Implementations§
Source§impl<'a> Session<'a>
impl<'a> Session<'a>
Sourcepub fn path(&'a self) -> &ObjectPath<'_>
pub fn path(&'a self) -> &ObjectPath<'_>
Get a reference to the underlying proxy’s object path.
pub async fn ready(&'a self) -> Result<()>
Sourcepub async fn disconnect(&'a self) -> Result<()>
pub async fn disconnect(&'a self) -> Result<()>
Disconnect and remove the VPN session.
Sourcepub async fn statistics(&'a self) -> Result<Statistics>
pub async fn statistics(&'a self) -> Result<Statistics>
Get tunnel statistics.
Sourcepub async fn get_property<T>(&'a self, property_name: &str) -> Result<T>
pub async fn get_property<T>(&'a self, property_name: &str) -> Result<T>
Get a property value from the underlying D-Bus proxy.
pub async fn user_input_queue_get_type_group( &'a self, ) -> Result<Vec<UserInputQueueTypeGroup>>
pub async fn user_input_queue_check( &'a self, qtype: ClientAttentionType, qgroup: ClientAttentionGroup, ) -> Result<Vec<u32>>
Sourcepub async fn user_input_queue_fetch(
&'a self,
qtype: ClientAttentionType,
qgroup: ClientAttentionGroup,
qid: u32,
) -> Result<UserInputSlot<'a>>
pub async fn user_input_queue_fetch( &'a self, qtype: ClientAttentionType, qgroup: ClientAttentionGroup, qid: u32, ) -> Result<UserInputSlot<'a>>
Fetch a UserInputSlot which represents a request for user input and which can be used to provide input to the backend.
§Arguments
qtype
- Queue type of the user input slot.qgroup
- Queue group of the user input slot.qid
- Queue ID of the user input slot to retrieve.
§Returns
A UserInputSlot which provides information on what input to query for.
Sourcepub async fn fetch_user_input_slots(&'a self) -> Result<Vec<UserInputSlot<'_>>>
pub async fn fetch_user_input_slots(&'a self) -> Result<Vec<UserInputSlot<'_>>>
Fetch all required user inputs.
§Returns
An array of UserInputSlot instances which represent single requests for input and can be used to provide input to the backend.
Sourcepub async fn attention_required_stream(
&self,
) -> Result<AttentionRequiredStream<'a>>
pub async fn attention_required_stream( &self, ) -> Result<AttentionRequiredStream<'a>>
Get a AttentionRequiredStream for this VPN session.
Sourcepub async fn status_change_stream(&self) -> Result<StatusChangeStream<'a>>
pub async fn status_change_stream(&self) -> Result<StatusChangeStream<'a>>
Get a StatusChangeStream for this VPN session.
Sourcepub async fn log_stream(&self) -> Result<LogStream<'a>>
pub async fn log_stream(&self) -> Result<LogStream<'a>>
Get a LogStream for this VPN session.
This should be called after the backend process is ready
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Session<'a>
impl<'a> !RefUnwindSafe for Session<'a>
impl<'a> Send for Session<'a>
impl<'a> Sync for Session<'a>
impl<'a> Unpin for Session<'a>
impl<'a> !UnwindSafe for Session<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more