pub struct IPv4Range { /* private fields */ }Expand description
§IPv4 range
A range can be respresented in string, following these rules:
- Start and end are placed inside one of
[],[)…, separated by a comma. [and]are inclusive.(and)are exclusive.- White spaces can be included. They will be ignored by parser.
- Length of the string must be equal to or smaller than 64 bytes. It’s for protection against flood attack.
Currently this struct is itself useless. You need to enable feature iter, in order to use IPv4RangeIter.
§Examples
use {
core::str::FromStr,
dia_ip_range::IPv4Range,
};
assert_eq!(
IPv4Range::from_str("10.0.0.[2,100)")?,
IPv4Range::from((10, 0, 0..=0, 2..100)),
);
Trait Implementations§
Source§impl<A, B, C, D> From<(A, B, C, D)> for IPv4Rangewhere
A: Into<IPv4ComponentRange>,
B: Into<IPv4ComponentRange>,
C: Into<IPv4ComponentRange>,
D: Into<IPv4ComponentRange>,
impl<A, B, C, D> From<(A, B, C, D)> for IPv4Rangewhere
A: Into<IPv4ComponentRange>,
B: Into<IPv4ComponentRange>,
C: Into<IPv4ComponentRange>,
D: Into<IPv4ComponentRange>,
Source§fn from((a, b, c, d): (A, B, C, D)) -> Self
fn from((a, b, c, d): (A, B, C, D)) -> Self
Converts to this type from the input type.
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 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