pub struct Hybrid<T> { /* private fields */ }Implementations§
Source§impl<T> Hybrid<T>where
T: LinkReference,
impl<T> Hybrid<T>where
T: LinkReference,
pub const fn new(value: T) -> Hybrid<T>
pub fn half() -> T
pub fn external(value: T) -> Hybrid<T>
pub const fn internal(value: T) -> Hybrid<T>
pub fn is_zero(&self) -> bool
pub fn is_internal(&self) -> bool
pub fn is_external(&self) -> bool
pub fn abs(&self) -> T
pub const fn as_inner(&self) -> T
Trait Implementations§
impl<T> Copy for Hybrid<T>where
T: Copy,
impl<T> Eq for Hybrid<T>where
T: Eq,
Source§impl<T> Ord for Hybrid<T>where
T: Ord,
impl<T> Ord for Hybrid<T>where
T: Ord,
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl<T> PartialOrd for Hybrid<T>where
T: PartialOrd,
impl<T> PartialOrd for Hybrid<T>where
T: PartialOrd,
impl<T> StructuralPartialEq for Hybrid<T>where
T: PartialEq,
Auto Trait Implementations§
impl<T> Freeze for Hybrid<T>where
T: Freeze,
impl<T> RefUnwindSafe for Hybrid<T>where
T: RefUnwindSafe,
impl<T> Send for Hybrid<T>where
T: Send,
impl<T> Sync for Hybrid<T>where
T: Sync,
impl<T> Unpin for Hybrid<T>where
T: Unpin,
impl<T> UnsafeUnpin for Hybrid<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Hybrid<T>where
T: UnwindSafe,
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