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<'_>
impl SessionWithTimeout<'_>
Sourcepub async fn rpc_raw(&self, inner_xml: &str) -> Result<RpcReply>
pub async fn rpc_raw(&self, inner_xml: &str) -> Result<RpcReply>
Send a raw RPC and wait for the reply with the configured timeout.
Sourcepub async fn get_config(
&self,
source: Datastore,
filter: Option<&str>,
) -> Result<String>
pub async fn get_config( &self, source: Datastore, filter: Option<&str>, ) -> Result<String>
Retrieve configuration from a datastore.
Sourcepub async fn get_config_payload(
&self,
source: Datastore,
filter: Option<&str>,
) -> Result<DataPayload>
pub async fn get_config_payload( &self, source: Datastore, filter: Option<&str>, ) -> Result<DataPayload>
Retrieve configuration as a zero-copy DataPayload.
Sourcepub async fn get(&self, filter: Option<&str>) -> Result<String>
pub async fn get(&self, filter: Option<&str>) -> Result<String>
Retrieve running configuration and state data.
Sourcepub async fn get_payload(&self, filter: Option<&str>) -> Result<DataPayload>
pub async fn get_payload(&self, filter: Option<&str>) -> Result<DataPayload>
Retrieve running configuration and state data as a zero-copy DataPayload.
Auto Trait Implementations§
impl<'a> Freeze for SessionWithTimeout<'a>
impl<'a> !RefUnwindSafe for SessionWithTimeout<'a>
impl<'a> Send for SessionWithTimeout<'a>
impl<'a> Sync for SessionWithTimeout<'a>
impl<'a> Unpin for SessionWithTimeout<'a>
impl<'a> UnsafeUnpin for SessionWithTimeout<'a>
impl<'a> !UnwindSafe for SessionWithTimeout<'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