pub struct Fixed(_);
Expand description
32-bit signed fixed-point number (16.16)
Implementations
Trait Implementations
sourceimpl Ord for Fixed
impl Ord for Fixed
sourceimpl PartialOrd<Fixed> for Fixed
impl PartialOrd<Fixed> for Fixed
sourcefn partial_cmp(&self, other: &Fixed) -> Option<Ordering>
fn partial_cmp(&self, other: &Fixed) -> 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
sourceimpl WriteBinary<Fixed> for Fixed
impl WriteBinary<Fixed> for Fixed
sourcefn write<C: WriteContext>(ctxt: &mut C, val: Self) -> Result<(), WriteError>
fn write<C: WriteContext>(ctxt: &mut C, val: Self) -> Result<(), WriteError>
Write the binary representation of Self to ctxt
.
impl Copy for Fixed
impl Eq for Fixed
impl StructuralEq for Fixed
impl StructuralPartialEq for Fixed
Auto Trait Implementations
impl RefUnwindSafe for Fixed
impl Send for Fixed
impl Sync for Fixed
impl Unpin for Fixed
impl UnwindSafe for Fixed
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<'a, T> ReadBinary<'a> for T where
T: ReadUnchecked<'a>,
impl<'a, T> ReadBinary<'a> for T where
T: ReadUnchecked<'a>,
type HostType = <T as ReadUnchecked<'a>>::HostType
fn read(
ctxt: &mut ReadCtxt<'a>
) -> Result<<T as ReadBinary<'a>>::HostType, ParseError>
sourceimpl<'a, T> ReadBinaryDep<'a> for T where
T: ReadBinary<'a>,
impl<'a, T> ReadBinaryDep<'a> for T where
T: ReadBinary<'a>,
type Args = ()
type HostType = <T as ReadBinary<'a>>::HostType
fn read_dep(
ctxt: &mut ReadCtxt<'a>,
<T as ReadBinaryDep<'a>>::Args
) -> Result<<T as ReadBinaryDep<'a>>::HostType, ParseError>
sourceimpl<'a, T> ReadFixedSizeDep<'a> for T where
T: ReadUnchecked<'a>,
impl<'a, T> ReadFixedSizeDep<'a> for T where
T: ReadUnchecked<'a>,
sourceimpl<'a, T> ReadUnchecked<'a> for T where
T: ReadFrom<'a>,
impl<'a, T> ReadUnchecked<'a> for T where
T: ReadFrom<'a>,
type HostType = T
sourceunsafe fn read_unchecked(
ctxt: &mut ReadCtxt<'a>
) -> <T as ReadUnchecked<'a>>::HostType
unsafe fn read_unchecked(
ctxt: &mut ReadCtxt<'a>
) -> <T as ReadUnchecked<'a>>::HostType
Must read exactly SIZE
bytes.
Unsafe as it avoids prohibitively expensive per-byte bounds checking. Read more
sourceimpl<T, HostType> WriteBinaryDep<HostType> for T where
T: WriteBinary<HostType>,
impl<T, HostType> WriteBinaryDep<HostType> for T where
T: WriteBinary<HostType>,
type Output = <T as WriteBinary<HostType>>::Output
type Output = <T as WriteBinary<HostType>>::Output
The type of the value returned by write_dep
.
sourcefn write_dep<C>(
ctxt: &mut C,
val: HostType,
<T as WriteBinaryDep<HostType>>::Args
) -> Result<<T as WriteBinaryDep<HostType>>::Output, WriteError> where
C: WriteContext,
fn write_dep<C>(
ctxt: &mut C,
val: HostType,
<T as WriteBinaryDep<HostType>>::Args
) -> Result<<T as WriteBinaryDep<HostType>>::Output, WriteError> where
C: WriteContext,
Write the binary representation of Self to ctxt
.