Struct libnetrangemerge::RangeInterest [−][src]
Implementations
impl<R: Range> RangeInterest<R>
[src]
A RangeInterest
represents a network range (some type
that implements `Range) and a boolean flag
that indicates if the range is selected - where
selected is an application defined concept.
Panics
merge_ranges_slice
merges a slice
of NetworkInterest
values in place and returns the size of the
result set. NetworkInterest
values after this returned size
are left in an invalid state and any attempt to call a method
on them may panic.
pub fn new(range: R, selected: bool) -> RangeInterest<R>
[src]
Create a new RangeInterest
with the given range
value and
selected
flag.
pub fn range(&self) -> &R
[src]
Return a shared reference to the contained range
value.
pub fn range_mut(&mut self) -> &mut R
[src]
Return a mutable reference to the contained range
value.
pub fn is_selected(&self) -> bool
[src]
Return the value of the selected
flag.
pub fn set_selected(&mut self, selected: bool)
[src]
Set the value of the selected
flag.
pub fn unwrap(self) -> R
[src]
Unwrap the NetworkInterest
and return the contained
range
value.
Trait Implementations
impl<R: Clone> Clone for RangeInterest<R> where
R: Range,
[src]
R: Range,
fn clone(&self) -> RangeInterest<R>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<R: Copy> Copy for RangeInterest<R> where
R: Range,
[src]
R: Range,
impl<R: Debug> Debug for RangeInterest<R> where
R: Range,
[src]
R: Range,
impl<R: Eq> Eq for RangeInterest<R> where
R: Range,
[src]
R: Range,
impl<R: PartialEq> PartialEq<RangeInterest<R>> for RangeInterest<R> where
R: Range,
[src]
R: Range,
fn eq(&self, other: &RangeInterest<R>) -> bool
[src]
fn ne(&self, other: &RangeInterest<R>) -> bool
[src]
impl<R> StructuralEq for RangeInterest<R> where
R: Range,
[src]
R: Range,
impl<R> StructuralPartialEq for RangeInterest<R> where
R: Range,
[src]
R: Range,
Auto Trait Implementations
impl<R> RefUnwindSafe for RangeInterest<R> where
R: RefUnwindSafe,
R: RefUnwindSafe,
impl<R> Send for RangeInterest<R> where
R: Send,
R: Send,
impl<R> Sync for RangeInterest<R> where
R: Sync,
R: Sync,
impl<R> Unpin for RangeInterest<R> where
R: Unpin,
R: Unpin,
impl<R> UnwindSafe for RangeInterest<R> where
R: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,