Skip to main content

SessionWithTimeout

Struct SessionWithTimeout 

Source
pub struct SessionWithTimeout<'a> { /* private fields */ }
Expand description

A wrapper around Session that applies a per-call timeout to every RPC.

Created by Session::with_timeout(). Each method sends the RPC via the underlying session and awaits the reply with the configured timeout.

Implementations§

Source§

impl SessionWithTimeout<'_>

Source

pub async fn rpc_raw(&self, inner_xml: &str) -> Result<RpcReply>

Send a raw RPC and wait for the reply with the configured timeout.

Source

pub async fn get_config( &self, source: Datastore, filter: Option<&str>, ) -> Result<String>

Retrieve configuration from a datastore.

Source

pub async fn get_config_payload( &self, source: Datastore, filter: Option<&str>, ) -> Result<DataPayload>

Retrieve configuration as a zero-copy DataPayload.

Source

pub async fn get(&self, filter: Option<&str>) -> Result<String>

Retrieve running configuration and state data.

Source

pub async fn get_payload(&self, filter: Option<&str>) -> Result<DataPayload>

Retrieve running configuration and state data as a zero-copy DataPayload.

Source

pub async fn edit_config(&self, target: Datastore, config: &str) -> Result<()>

Edit the configuration of a target datastore.

Source

pub async fn lock(&self, target: Datastore) -> Result<()>

Lock a datastore.

Source

pub async fn unlock(&self, target: Datastore) -> Result<()>

Unlock a datastore.

Source

pub async fn commit(&self) -> Result<()>

Commit the candidate configuration to running.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Classify for T

Source§

type Classified = T

Source§

fn classify(self) -> T

Source§

impl<T> Declassify for T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V