pub enum RuleSetV6Request {
AuthenticateForRouteTable {
table: u32,
token: Event,
responder: RuleSetV6AuthenticateForRouteTableResponder,
},
RemoveRule {
index: u32,
responder: RuleSetV6RemoveRuleResponder,
},
Close {
control_handle: RuleSetV6ControlHandle,
},
AddRule {
index: u32,
matcher: RuleMatcherV6,
action: RuleAction,
responder: RuleSetV6AddRuleResponder,
},
}
Expand description
Provides mutable access over a set of the system’s IPv6 route rules.
A RuleSet
has a priority and a rule has an index. A global order among the
rules is determined first by the priority of the RuleSet
the rule belongs
to, and then the index of the rule inside the RuleSet
.
This protocol encodes the lifetime of the rule set. Closing the client end removes the rule set, and all the rules that are owned by the rule set.
Variants§
AuthenticateForRouteTable
Authenticates for a route table that will be used in an action.
RemoveRule
Removes a rule from this rule set.
If the client tries to remove from an index that does not have a rule,
the error RULE_DOES_NOT_EXIST
will be returned.
- request
index
the index of the rule.
Close
Removes all rules in the rule set and the underlying channel will be closed after the rules are removed.
This method provides a way for synchronous closure.
Fields
control_handle: RuleSetV6ControlHandle
AddRule
Adds a rule to this rule set.
If there is already a rule at the provided index
, RULE_ALREADY_EXISTS
is returned.
- request
index
where to insert the rule. - request
matcher
the matcher of the rule. - request
action
action of the rule.
Implementations§
Source§impl RuleSetV6Request
impl RuleSetV6Request
pub fn into_authenticate_for_route_table( self, ) -> Option<(u32, Event, RuleSetV6AuthenticateForRouteTableResponder)>
pub fn into_remove_rule(self) -> Option<(u32, RuleSetV6RemoveRuleResponder)>
pub fn into_close(self) -> Option<RuleSetV6ControlHandle>
pub fn into_add_rule( self, ) -> Option<(u32, RuleMatcherV6, RuleAction, RuleSetV6AddRuleResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL