Struct libnetrangemerge::RangeInterest[][src]

pub struct RangeInterest<R> where
    R: Range
{ /* fields omitted */ }

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]

impl<R: Copy> Copy for RangeInterest<R> where
    R: Range
[src]

impl<R: Debug> Debug for RangeInterest<R> where
    R: Range
[src]

impl<R: Eq> Eq for RangeInterest<R> where
    R: Range
[src]

impl<R: PartialEq> PartialEq<RangeInterest<R>> for RangeInterest<R> where
    R: Range
[src]

impl<R> StructuralEq for RangeInterest<R> where
    R: Range
[src]

impl<R> StructuralPartialEq for RangeInterest<R> where
    R: Range
[src]

Auto Trait Implementations

impl<R> RefUnwindSafe for RangeInterest<R> where
    R: RefUnwindSafe

impl<R> Send for RangeInterest<R> where
    R: Send

impl<R> Sync for RangeInterest<R> where
    R: Sync

impl<R> Unpin for RangeInterest<R> where
    R: Unpin

impl<R> UnwindSafe for RangeInterest<R> where
    R: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.