Struct gut::interval::ClosedInterval [−][src]
Interval from a to b that contains both endponts, where a < b on the floating point line.
Fields
a: T
The lower limit of the interval
b: T
The upper limit of the interval
Implementations
impl<T: PartialOrd + PartialEq + Copy> ClosedInterval<T>
[src]
pub fn new(a: T, b: T) -> ClosedInterval<T>
[src]
pub fn is_singleton(&self) -> bool
[src]
Check if this interval contains just one point
pub fn endpoint(&self, which: EndPoint) -> T
[src]
impl<T: Sub<Output = T> + Copy + PartialOrd> ClosedInterval<T>
[src]
Trait Implementations
impl<T: Float> Absorb<ClosedInterval<T>> for ClosedInterval<T>
[src]
impl<T: Float> Absorb<T> for ClosedInterval<T>
[src]
impl<T: Float> Centroid<Option<T>> for ClosedInterval<T>
[src]
impl<T: Clone> Clone for ClosedInterval<T>
[src]
fn clone(&self) -> ClosedInterval<T>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: PartialOrd> Contains<T> for ClosedInterval<T>
[src]
impl<T: Copy> Copy for ClosedInterval<T>
[src]
impl<T: Debug> Debug for ClosedInterval<T>
[src]
impl<T: Float> Default for ClosedInterval<T>
[src]
fn default() -> Self
[src]
Create an empty interval. The choice of enpoints here is arbitrary as long as b < a.
impl<T: Float> Empty for ClosedInterval<T>
[src]
impl<T: Eq> Eq for ClosedInterval<T>
[src]
impl<T: Hash> Hash for ClosedInterval<T>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<T: Float> Intersect<ClosedInterval<T>> for ClosedInterval<T>
[src]
type Output = Self
fn intersect(self, interval: Self) -> Self
[src]
fn intersects(self, interval: Self) -> bool
[src]
impl<T: PartialEq> PartialEq<ClosedInterval<T>> for ClosedInterval<T>
[src]
fn eq(&self, other: &ClosedInterval<T>) -> bool
[src]
fn ne(&self, other: &ClosedInterval<T>) -> bool
[src]
impl<T> StructuralEq for ClosedInterval<T>
[src]
impl<T> StructuralPartialEq for ClosedInterval<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for ClosedInterval<T> where
T: RefUnwindSafe,
[src]
T: RefUnwindSafe,
impl<T> Send for ClosedInterval<T> where
T: Send,
[src]
T: Send,
impl<T> Sync for ClosedInterval<T> where
T: Sync,
[src]
T: Sync,
impl<T> Unpin for ClosedInterval<T> where
T: Unpin,
[src]
T: Unpin,
impl<T> UnwindSafe for ClosedInterval<T> where
T: UnwindSafe,
[src]
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> AsSlice<T> for T
[src]
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> CallHasher for T where
T: Hash,
T: Hash,
impl<T> CloneBytes for T where
T: 'static + Clone,
[src]
T: 'static + Clone,
pub unsafe fn clone_bytes(
src: &[MaybeUninit<u8>]
) -> Box<[MaybeUninit<u8>], Global>
[src]
src: &[MaybeUninit<u8>]
) -> Box<[MaybeUninit<u8>], Global>
pub unsafe fn clone_from_bytes(
dst: &mut [MaybeUninit<u8>],
src: &[MaybeUninit<u8>]
)
[src]
dst: &mut [MaybeUninit<u8>],
src: &[MaybeUninit<u8>]
)
pub unsafe fn clone_into_raw_bytes(
src: &[MaybeUninit<u8>],
dst: &mut [MaybeUninit<u8>]
)
[src]
src: &[MaybeUninit<u8>],
dst: &mut [MaybeUninit<u8>]
)
impl<T> CopyElem for T where
T: Any + Copy,
[src]
T: Any + Copy,
impl<T> DebugBytes for T where
T: 'static + Debug,
[src]
T: 'static + Debug,
pub unsafe fn fmt_bytes(
bytes: &[MaybeUninit<u8>],
f: &mut Formatter<'_>
) -> Result<(), Error>
[src]
bytes: &[MaybeUninit<u8>],
f: &mut Formatter<'_>
) -> Result<(), Error>
impl<T> Downcast for T where
T: Any,
T: Any,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn as_any(&self) -> &(dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Send + Sync + Any,
T: Send + Sync + Any,
impl<T> DropBytes for T where
T: 'static,
[src]
T: 'static,
pub unsafe fn drop_bytes(bytes: &mut [MaybeUninit<u8>])
[src]
impl<T> Elem for T where
T: Any + DropBytes,
[src]
T: Any + DropBytes,
impl<T> From<T> for T
[src]
impl<'a, S, I> Get<'a, I> for S where
I: GetIndex<'a, S>,
[src]
I: GetIndex<'a, S>,
type Output = <I as GetIndex<'a, S>>::Output
pub fn get(&self, idx: I) -> Option<<I as GetIndex<'a, S>>::Output>
[src]
pub fn at(&self, idx: I) -> Self::Output
[src]
impl<T> HashBytes for T where
T: 'static + Hash,
[src]
T: 'static + Hash,
pub unsafe fn hash_bytes(bytes: &[MaybeUninit<u8>], state: &mut dyn Hasher)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<S, I> Isolate<I> for S where
I: IsolateIndex<S>,
[src]
I: IsolateIndex<S>,
type Output = <I as IsolateIndex<S>>::Output
pub unsafe fn isolate_unchecked(self, idx: I) -> <S as Isolate<I>>::Output
[src]
pub fn try_isolate(self, idx: I) -> Option<<S as Isolate<I>>::Output>
[src]
pub fn isolate(self, idx: I) -> Self::Output
[src]
impl<T> PartialEqBytes for T where
T: 'static + PartialEq<T>,
[src]
T: 'static + PartialEq<T>,
impl<T> Pod for T where
T: 'static + Copy + Send + Sync + Any,
[src]
T: 'static + Copy + Send + Sync + Any,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T, N> PushArrayToVec<N> for T where
T: Clone,
N: Array<T>,
[src]
T: Clone,
N: Array<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
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>,