pub struct Fixed(_);
Expand description
32-bit signed fixed-point number (16.16)
Implementations
Trait Implementations
sourceimpl Ord for Fixed
impl Ord for Fixed
1.21.0 · sourceconst fn max(self, other: Self) -> Self
const fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourceconst fn min(self, other: Self) -> Self
const fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
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>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const 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 moresourceimpl 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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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 Twhere
T: ReadUnchecked<'a>,
impl<'a, T> ReadBinary<'a> for Twhere
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 Twhere
T: ReadBinary<'a>,
impl<'a, T> ReadBinaryDep<'a> for Twhere
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 Twhere
T: ReadUnchecked<'a>,
impl<'a, T> ReadFixedSizeDep<'a> for Twhere
T: ReadUnchecked<'a>,
sourceimpl<'a, T> ReadUnchecked<'a> for Twhere
T: ReadFrom<'a>,
impl<'a, T> ReadUnchecked<'a> for Twhere
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 moresourceimpl<T, HostType> WriteBinaryDep<HostType> for Twhere
T: WriteBinary<HostType>,
impl<T, HostType> WriteBinaryDep<HostType> for Twhere
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
.