pub enum CommitResult {
Ok(Empty),
RuleWithInvalidMatcher(RuleId),
RuleWithInvalidAction(RuleId),
CyclicalRoutineGraph(RoutineId),
ErrorOnChange(Vec<CommitError>),
TransparentProxyWithInvalidMatcher(RuleId),
RedirectWithInvalidMatcher(RuleId),
MasqueradeWithInvalidMatcher(RuleId),
// some variants omitted
}
Variants§
Ok(Empty)
The commit was successfully applied.
RuleWithInvalidMatcher(RuleId)
One of the changes in the commit caused the specified rule’s matcher to be invalid for the context in which the rule will be evaluated.
For example, this could be a matcher on the ingress interface on a rule that is in a routine installed in the egress hook, or a matcher on the source address specifying an IPv4 subnet that is in an IPv6-only namespace.
RuleWithInvalidAction(RuleId)
One of the changes in the commit caused the specified rule’s action to be invalid for the context in which the rule will be evaluated.
For example, this could be a NAT action in an IP routine.
CyclicalRoutineGraph(RoutineId)
The routine graph forms a cycle, including (at least) the specified routine.
Each uninstalled routine and all of the routines it directly or transitively jumps to must form a DAG.
ErrorOnChange(Vec<CommitError>)
At least one of the changes provided was invalid given the current
state when Commit
was called. In order to be maximally
informative, a vector of results is returned where each result
corresponds to the change at the same index (across all batches of
pending changes).
TransparentProxyWithInvalidMatcher(RuleId)
A rule has a TransparentProxy action without a corresponding valid matcher: the rule must match on transport protocol to ensure that the packet has either a TCP or UDP header.
RedirectWithInvalidMatcher(RuleId)
A rule has a Redirect action without a corresponding valid matcher: if the action specifies a destination port, the rule must match on transport protocol to ensure that the packet has either a TCP or UDP header.
MasqueradeWithInvalidMatcher(RuleId)
A rule has a Masquerade action without a corresponding valid matcher: if the action specifies a source port, the rule must match on transport protocol to ensure that the packet has either a TCP or UDP header.
Implementations§
Source§impl CommitResult
impl CommitResult
pub fn ordinal(&self) -> u64
pub fn unknown_variant_for_testing() -> Self
pub fn is_unknown(&self) -> bool
Trait Implementations§
Source§impl Debug for CommitResult
impl Debug for CommitResult
Source§impl Decode<CommitResult, DefaultFuchsiaResourceDialect> for CommitResult
impl Decode<CommitResult, DefaultFuchsiaResourceDialect> for CommitResult
Source§impl Encode<CommitResult, DefaultFuchsiaResourceDialect> for &mut CommitResult
impl Encode<CommitResult, DefaultFuchsiaResourceDialect> for &mut CommitResult
Source§impl PartialEq for CommitResult
impl PartialEq for CommitResult
Source§impl ResourceTypeMarker for CommitResult
impl ResourceTypeMarker for CommitResult
Source§type Borrowed<'a> = &'a mut CommitResult
type Borrowed<'a> = &'a mut CommitResult
Encode<Self>
type cheaply obtainable from &mut Self::Owned
. There are three cases: Read moreSource§fn take_or_borrow<'a>(
value: &'a mut <Self as TypeMarker>::Owned,
) -> Self::Borrowed<'a>
fn take_or_borrow<'a>( value: &'a mut <Self as TypeMarker>::Owned, ) -> Self::Borrowed<'a>
&mut Self::Owned
to Self::Borrowed
. For
HandleBased
types this is “take” (it returns an owned handle and
replaces value
with Handle::invalid
), and for all other types it is
“borrow” (just converts from one reference to another).Source§impl TypeMarker for CommitResult
impl TypeMarker for CommitResult
Source§type Owned = CommitResult
type Owned = CommitResult
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.