Struct intervals_rs::Interval[][src]

pub struct Interval<T: Debug + Display + Clone + Hash + Eq + Ord + PartialEq + PartialOrd> { /* fields omitted */ }

Implementations

impl<T: Debug + Display + Clone + Hash + Eq + Ord + PartialEq + PartialOrd> Interval<T>[src]

pub fn and_more(lower: LimitValue<T>) -> Self[src]

pub fn closed(lower: LimitValue<T>, upper: LimitValue<T>) -> Self[src]

pub fn more_than(lower: LimitValue<T>) -> Self[src]

pub fn open(lower: LimitValue<T>, upper: LimitValue<T>) -> Self[src]

pub fn over(
    lower: LimitValue<T>,
    lower_included: bool,
    upper: LimitValue<T>,
    upper_included: bool
) -> Self
[src]

pub fn single_element(element: LimitValue<T>) -> Self[src]

pub fn under(upper: LimitValue<T>) -> Self[src]

pub fn up_to(upper: LimitValue<T>) -> Self[src]

pub fn complement_relative_to(&self, other: &Interval<T>) -> Vec<Interval<T>>[src]

pub fn covers(&self, other: &Interval<T>) -> bool[src]

pub fn gap(&self, other: &Interval<T>) -> Interval<T>[src]

pub fn is_single_element(&self) -> bool[src]

pub fn empty_of_same_type(&self) -> Interval<T>[src]

pub fn new_of_same_type(
    &self,
    lower: LimitValue<T>,
    lower_closed: bool,
    upper: LimitValue<T>,
    upper_closed: bool
) -> Interval<T>
[src]

pub fn includes(&self, value: &LimitValue<T>) -> bool[src]

pub fn is_below(&self, value: &LimitValue<T>) -> bool[src]

pub fn is_above(&self, value: &LimitValue<T>) -> bool[src]

pub fn is_open(&self) -> bool[src]

pub fn is_closed(&self) -> bool[src]

pub fn is_empty(&self) -> bool[src]

pub fn new(lower: IntervalLimit<T>, upper: IntervalLimit<T>) -> Interval<T>[src]

pub fn new_with(
    lower: LimitValue<T>,
    is_lower_closed: bool,
    upper: LimitValue<T>,
    is_upper_closed: bool
) -> Interval<T>
[src]

pub fn intersect(&self, other: &Interval<T>) -> Interval<T>[src]

pub fn intersects(&self, other: &Interval<T>) -> bool[src]

pub fn upper_limit(&self) -> &LimitValue<T>[src]

pub fn lower_limit(&self) -> &LimitValue<T>[src]

pub fn has_upper_limit(&self) -> bool[src]

pub fn has_lower_limit(&self) -> bool[src]

pub fn includes_upper_limit(&self) -> bool[src]

pub fn includes_lower_limit(&self) -> bool[src]

pub fn greater_of_lower_limits<'a>(
    &'a self,
    other: &'a Interval<T>
) -> &'a LimitValue<T>
[src]

pub fn lesser_of_upper_limits<'a>(
    &'a self,
    other: &'a Interval<T>
) -> &'a LimitValue<T>
[src]

pub fn greater_of_lower_included_in_intersection(
    &self,
    other: &Interval<T>
) -> bool
[src]

pub fn greater_of_lower_included_in_union(&self, other: &Interval<T>) -> bool[src]

pub fn lesser_of_upper_included_in_intersection(
    &self,
    other: &Interval<T>
) -> bool
[src]

pub fn lesser_of_upper_included_in_union(&self, other: &Interval<T>) -> bool[src]

pub fn left_complement_relative_to(
    &self,
    other: &Interval<T>
) -> Option<Interval<T>>
[src]

この区間の下側区間と与えた区間 other の共通部分を返す。

other 比較対象の区間 return この区間の下側の補区間と、与えた区間の共通部分。存在しない場合は None

pub fn right_complement_relative_to(
    &self,
    other: &Interval<T>
) -> Option<Interval<T>>
[src]

Trait Implementations

impl<T: Clone + Debug + Display + Hash + Eq + Ord + PartialEq + PartialOrd> Clone for Interval<T>[src]

fn clone(&self) -> Interval<T>[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<T: Debug + Display + Clone + Hash + Eq + Ord + PartialEq + PartialOrd> Debug for Interval<T>[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<T: Debug + Display + Clone + Hash + Eq + Ord + PartialEq + PartialOrd> Display for Interval<T>[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<T: Hash + Debug + Display + Clone + Eq + Ord + PartialEq + PartialOrd> Hash for Interval<T>[src]

fn hash<__H: Hasher>(&self, state: &mut __H)[src]

Feeds this value into the given Hasher. Read more

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given Hasher. Read more

impl<T: Debug + Display + Clone + Hash + Eq + Ord + PartialEq + PartialOrd> PartialEq<Interval<T>> for Interval<T>[src]

fn eq(&self, other: &Self) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<T: Eq + Debug + Display + Clone + Hash + Ord + PartialEq + PartialOrd> Eq for Interval<T>[src]

impl<T: Debug + Display + Clone + Hash + Eq + Ord + PartialEq + PartialOrd> StructuralEq for Interval<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Interval<T> where
    T: RefUnwindSafe

impl<T> Send for Interval<T> where
    T: Send

impl<T> Sync for Interval<T> where
    T: Sync

impl<T> Unpin for Interval<T> where
    T: Unpin

impl<T> UnwindSafe for Interval<T> where
    T: UnwindSafe

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T> ToString for T where
    T: Display + ?Sized
[src]

pub default fn to_string(&self) -> String[src]

Converts the given value to a String. Read more

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.