pub struct Client { /* private fields */ }Expand description
Provides the main functionality of connection to a target device and manipulating configuration or querying telemetry.
Implementations§
source§impl<'a> Client
impl<'a> Client
sourcepub fn builder(target: &'a str) -> ClientBuilder<'a>
pub fn builder(target: &'a str) -> ClientBuilder<'a>
Create a ClientBuilder that can create Clients.
sourcepub async fn capabilities(&mut self) -> CapabilityResponse
pub async fn capabilities(&mut self) -> CapabilityResponse
Returns information from the target device about its capabilities according to the gNMI Specification Section 3.2.2
§Examples
let mut client = Client::builder("https://clab-srl01-srl:57400")
.tls(CERT, "clab-srl01-srl")
.build()
.await
.unwrap();
let capabilities = client.capabilities().await;Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request