pub struct CrpcEndhostApiClient { /* private fields */ }Expand description
Connect RPC endhost API client.
Implementations§
Source§impl CrpcEndhostApiClient
impl CrpcEndhostApiClient
Sourcepub fn new(base_url: &Url) -> Result<CrpcEndhostApiClient, Error>
pub fn new(base_url: &Url) -> Result<CrpcEndhostApiClient, Error>
Creates a new endhost API client from the given base URL.
Sourcepub fn new_with_client(
base_url: &Url,
client: Client,
) -> Result<CrpcEndhostApiClient, Error>
pub fn new_with_client( base_url: &Url, client: Client, ) -> Result<CrpcEndhostApiClient, Error>
Creates a new endhost API client from the given base URL and reqwest::Client.
Sourcepub fn use_token_source(
&mut self,
token_source: Arc<dyn TokenSource>,
) -> &mut CrpcEndhostApiClient
pub fn use_token_source( &mut self, token_source: Arc<dyn TokenSource>, ) -> &mut CrpcEndhostApiClient
Uses the provided token source for authentication.
Methods from Deref<Target = CrpcClient>§
Sourcepub async fn unary_request<Req, Res>(
&self,
path: &str,
req: Req,
) -> Result<Res, CrpcClientError>
pub async fn unary_request<Req, Res>( &self, path: &str, req: Req, ) -> Result<Res, CrpcClientError>
Unary RPC request.
Trait Implementations§
Source§impl Deref for CrpcEndhostApiClient
impl Deref for CrpcEndhostApiClient
Source§type Target = CrpcClient
type Target = CrpcClient
The resulting type after dereferencing.
Source§impl EndhostApiClient for CrpcEndhostApiClient
impl EndhostApiClient for CrpcEndhostApiClient
Source§fn list_underlays<'life0, 'async_trait>(
&'life0 self,
isd_as: IsdAsn,
) -> Pin<Box<dyn Future<Output = Result<Underlays, CrpcClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
CrpcEndhostApiClient: 'async_trait,
fn list_underlays<'life0, 'async_trait>(
&'life0 self,
isd_as: IsdAsn,
) -> Pin<Box<dyn Future<Output = Result<Underlays, CrpcClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
CrpcEndhostApiClient: 'async_trait,
List the available underlays for a given ISD-AS. Read more
Source§fn list_segments<'life0, 'async_trait>(
&'life0 self,
src: IsdAsn,
dst: IsdAsn,
page_size: i32,
page_token: String,
) -> Pin<Box<dyn Future<Output = Result<SegmentsPage, CrpcClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
CrpcEndhostApiClient: 'async_trait,
fn list_segments<'life0, 'async_trait>(
&'life0 self,
src: IsdAsn,
dst: IsdAsn,
page_size: i32,
page_token: String,
) -> Pin<Box<dyn Future<Output = Result<SegmentsPage, CrpcClientError>> + Send + 'async_trait>>where
'life0: 'async_trait,
CrpcEndhostApiClient: 'async_trait,
List the available segments between a source and destination ISD-AS. Read more
Auto Trait Implementations§
impl !Freeze for CrpcEndhostApiClient
impl !RefUnwindSafe for CrpcEndhostApiClient
impl Send for CrpcEndhostApiClient
impl Sync for CrpcEndhostApiClient
impl Unpin for CrpcEndhostApiClient
impl UnsafeUnpin for CrpcEndhostApiClient
impl !UnwindSafe for CrpcEndhostApiClient
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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