pub struct Ipv4Range {
pub start_addr: Ipv4Addr,
pub end_addr: Ipv4Addr,
}Expand description
A contiguous range of IPv4 addresses defined by a start and end point.
Both boundaries are inclusive. Stored as two Ipv4Addr values (8 bytes total).
Fields§
§start_addr: Ipv4AddrThe inclusive starting address of the range.
end_addr: Ipv4AddrThe inclusive ending address of the range.
Implementations§
Source§impl Ipv4Range
impl Ipv4Range
Sourcepub fn new(start: Ipv4Addr, end: Ipv4Addr) -> Result<Self, IpError>
pub fn new(start: Ipv4Addr, end: Ipv4Addr) -> Result<Self, IpError>
Creates a new Ipv4Range.
§Errors
Returns IpError::InvalidRange if start is numerically greater than end.
Trait Implementations§
impl Copy for Ipv4Range
impl Eq for Ipv4Range
impl StructuralPartialEq for Ipv4Range
Auto Trait Implementations§
impl Freeze for Ipv4Range
impl RefUnwindSafe for Ipv4Range
impl Send for Ipv4Range
impl Sync for Ipv4Range
impl Unpin for Ipv4Range
impl UnsafeUnpin for Ipv4Range
impl UnwindSafe for Ipv4Range
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