Struct platform_data::Hybrid
source · [−]pub struct Hybrid<T: LinkType> { /* private fields */ }Implementations
sourceimpl<T: LinkType> Hybrid<T>
impl<T: LinkType> Hybrid<T>
pub fn new(value: T) -> Self
pub fn external(value: T) -> Self
pub fn internal(value: T) -> Self
pub fn half() -> T
pub fn external_zero() -> T
pub fn is_nothing(&self) -> bool
pub fn is_internal(&self) -> bool
pub fn is_external(&self) -> bool
pub fn signed(&self) -> <T as ToSigned>::Type
pub fn absolute(&self) -> T
pub fn as_value(&self) -> T
Trait Implementations
sourceimpl<T: Ord + LinkType> Ord for Hybrid<T>
impl<T: Ord + LinkType> Ord for Hybrid<T>
sourceimpl<T: PartialOrd + LinkType> PartialOrd<Hybrid<T>> for Hybrid<T>
impl<T: PartialOrd + LinkType> PartialOrd<Hybrid<T>> for Hybrid<T>
sourcefn partial_cmp(&self, other: &Hybrid<T>) -> Option<Ordering>
fn partial_cmp(&self, other: &Hybrid<T>) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<T: Copy + LinkType> Copy for Hybrid<T>
impl<T: Eq + LinkType> Eq for Hybrid<T>
impl<T: LinkType> StructuralEq for Hybrid<T>
impl<T: LinkType> StructuralPartialEq for Hybrid<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for Hybrid<T> where
T: RefUnwindSafe,
impl<T> Send for Hybrid<T>
impl<T> Sync for Hybrid<T>
impl<T> Unpin for Hybrid<T> where
T: Unpin,
impl<T> UnwindSafe for Hybrid<T> where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more