pub enum FlowSpecComponent {
Show 15 variants
DestinationPrefix(NetworkPrefix),
SourcePrefix(NetworkPrefix),
IpProtocol(Vec<NumericOperator>),
Port(Vec<NumericOperator>),
DestinationPort(Vec<NumericOperator>),
SourcePort(Vec<NumericOperator>),
IcmpType(Vec<NumericOperator>),
IcmpCode(Vec<NumericOperator>),
TcpFlags(Vec<BitmaskOperator>),
PacketLength(Vec<NumericOperator>),
Dscp(Vec<NumericOperator>),
Fragment(Vec<BitmaskOperator>),
FlowLabel(Vec<NumericOperator>),
DestinationIpv6Prefix {
offset: u8,
prefix: NetworkPrefix,
},
SourceIpv6Prefix {
offset: u8,
prefix: NetworkPrefix,
},
}Expand description
Individual Flow-Spec component types as defined in RFC 8955/8956
Variants§
DestinationPrefix(NetworkPrefix)
Type 1: Destination Prefix
SourcePrefix(NetworkPrefix)
Type 2: Source Prefix
IpProtocol(Vec<NumericOperator>)
Type 3: IP Protocol
Port(Vec<NumericOperator>)
Type 4: Port (source OR destination)
DestinationPort(Vec<NumericOperator>)
Type 5: Destination Port
SourcePort(Vec<NumericOperator>)
Type 6: Source Port
IcmpType(Vec<NumericOperator>)
Type 7: ICMP Type (IPv4) / ICMPv6 Type (IPv6)
IcmpCode(Vec<NumericOperator>)
Type 8: ICMP Code (IPv4) / ICMPv6 Code (IPv6)
TcpFlags(Vec<BitmaskOperator>)
Type 9: TCP Flags
PacketLength(Vec<NumericOperator>)
Type 10: Packet Length
Dscp(Vec<NumericOperator>)
Type 11: DSCP
Fragment(Vec<BitmaskOperator>)
Type 12: Fragment
FlowLabel(Vec<NumericOperator>)
Type 13: Flow Label (IPv6 only)
DestinationIpv6Prefix
IPv6 Destination Prefix with offset
SourceIpv6Prefix
IPv6 Source Prefix with offset
Implementations§
Source§impl FlowSpecComponent
impl FlowSpecComponent
Sourcepub const fn component_type(&self) -> u8
pub const fn component_type(&self) -> u8
Get the numeric type identifier for this component
Sourcepub const fn uses_numeric_operators(&self) -> bool
pub const fn uses_numeric_operators(&self) -> bool
Returns true if this component uses numeric operators
Sourcepub const fn uses_bitmask_operators(&self) -> bool
pub const fn uses_bitmask_operators(&self) -> bool
Returns true if this component uses bitmask operators
Trait Implementations§
Source§impl Clone for FlowSpecComponent
impl Clone for FlowSpecComponent
Source§fn clone(&self) -> FlowSpecComponent
fn clone(&self) -> FlowSpecComponent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FlowSpecComponent
impl Debug for FlowSpecComponent
Source§impl PartialEq for FlowSpecComponent
impl PartialEq for FlowSpecComponent
impl Eq for FlowSpecComponent
impl StructuralPartialEq for FlowSpecComponent
Auto Trait Implementations§
impl Freeze for FlowSpecComponent
impl RefUnwindSafe for FlowSpecComponent
impl Send for FlowSpecComponent
impl Sync for FlowSpecComponent
impl Unpin for FlowSpecComponent
impl UnwindSafe for FlowSpecComponent
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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 more