pub struct RouteClient { /* private fields */ }Expand description
Calls RouteService.
Routes: where a route table sends traffic to a destination outside the VPC. A route is immutable: it is created and deleted, never changed, so to change one, delete it and create its replacement. A table has at most one route per destination, so the replacement can only be created once the old route is deleted: between the two, the table has no route to that destination.
Implementations§
Source§impl RouteClient
impl RouteClient
Sourcepub fn new(client: &Client) -> Self
pub fn new(client: &Client) -> Self
Returns a client of RouteService that sends its calls through client.
Sourcepub fn service(&self) -> &Service
pub fn service(&self) -> &Service
The endpoint the client sends its calls to, which also serves the operations its methods answer with.
Sourcepub async fn get_route(&self, request: GetRouteRequest) -> Result<Route, Error>
pub async fn get_route(&self, request: GetRouteRequest) -> Result<Route, Error>
Returns a route.
Sourcepub async fn list_routes(
&self,
request: ListRoutesRequest,
) -> Result<ListRoutesResponse, Error>
pub async fn list_routes( &self, request: ListRoutesRequest, ) -> Result<ListRoutesResponse, Error>
Lists a route table’s routes, oldest first. Its local routes aren’t
listed: they are the table’s local_routes.
Sourcepub fn all_routes(&self, request: ListRoutesRequest) -> Pages<Route>
pub fn all_routes(&self, request: ListRoutesRequest) -> Pages<Route>
Returns everything list_routes lists from request’s page on, fetching the next page as the stream reaches it. A page that fails ends the stream with its error.
Sourcepub async fn create_route(
&self,
request: CreateRouteRequest,
) -> Result<Operation<Route>, Error>
pub async fn create_route( &self, request: CreateRouteRequest, ) -> Result<Operation<Route>, Error>
Adds a route to a route table. Refused with FAILED_PRECONDITION when
the table has a route to the same destination. The operation is done
once the change is recorded; the network applies it within seconds.
It answers with an operation to wait on: Operation::wait returns the Route once the change is done.
Sourcepub async fn delete_route(
&self,
request: DeleteRouteRequest,
) -> Result<Operation<Empty>, Error>
pub async fn delete_route( &self, request: DeleteRouteRequest, ) -> Result<Operation<Empty>, Error>
Removes a route from its route table. The operation is done once the change is recorded; the network applies it within seconds.
It answers with an operation to wait on, which has no result: Operation::wait returns once the change is done.