pub enum StateRequest {
Resolve {
destination: IpAddress,
responder: StateResolveResponder,
},
GetRouteTableName {
table_id: u32,
responder: StateGetRouteTableNameResponder,
},
}
Expand description
Provides access to the system’s routing state.
Variants§
Resolve
Resolves the route to a destination.
- request
destination
the IP address to resolve a route to. If the unspecified address (all zeroes) is provided, the default route will be returned. The variant ofdestination
determines variant of [fuchsia.net/IpAddress
] fields in the resolved route.
- response
result
contains the resolved route todestination
.
- error
ZX_ERR_ADDRESS_UNREACHABLE
ifdestination
can’t be resolved.
GetRouteTableName
Gets the route table name by its ID.
- request
table_id
the ID of the route table in question.
- response
table_name
the name of the route table, if the route table does not have a name, an empty string is returned.
- error
NO_TABLE
if the route table does not exist.
Implementations§
Source§impl StateRequest
impl StateRequest
pub fn into_resolve(self) -> Option<(IpAddress, StateResolveResponder)>
pub fn into_get_route_table_name( self, ) -> Option<(u32, StateGetRouteTableNameResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StateRequest
impl !RefUnwindSafe for StateRequest
impl Send for StateRequest
impl Sync for StateRequest
impl Unpin for StateRequest
impl !UnwindSafe for StateRequest
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