#[repr(C)]pub struct Fraction {
pub num: u32,
pub denom: u32,
}
Fields§
§num: u32
§denom: u32
Trait Implementations§
source§impl Clone for spa_fraction
impl Clone for spa_fraction
source§fn clone(&self) -> spa_fraction
fn clone(&self) -> spa_fraction
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for spa_fraction
impl Debug for spa_fraction
source§impl PartialEq for spa_fraction
impl PartialEq for spa_fraction
source§fn eq(&self, other: &spa_fraction) -> bool
fn eq(&self, other: &spa_fraction) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'de> PodDeserialize<'de> for Fraction
impl<'de> PodDeserialize<'de> for Fraction
source§fn deserialize(
deserializer: PodDeserializer<'de>
) -> Result<(Self, DeserializeSuccess<'de>), DeserializeError<&'de [u8]>>where
Self: Sized,
fn deserialize(
deserializer: PodDeserializer<'de>
) -> Result<(Self, DeserializeSuccess<'de>), DeserializeError<&'de [u8]>>where
Self: Sized,
Deserialize the type by using the provided
PodDeserializer
impl CanonicalFixedSizedPod for Fraction
Serialize into a Fraction
type pod.
impl Copy for spa_fraction
impl Eq for spa_fraction
impl StructuralPartialEq for spa_fraction
Auto Trait Implementations§
impl RefUnwindSafe for spa_fraction
impl Send for spa_fraction
impl Sync for spa_fraction
impl Unpin for spa_fraction
impl UnwindSafe for spa_fraction
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
source§impl<T> FixedSizedPod for Twhere
T: CanonicalFixedSizedPod + Copy,
impl<T> FixedSizedPod for Twhere
T: CanonicalFixedSizedPod + Copy,
§type CanonicalType = T
type CanonicalType = T
The canonical representation of the type of pod that should be serialized to/deserialized from.
source§fn as_canonical_type(&self) -> <T as FixedSizedPod>::CanonicalType
fn as_canonical_type(&self) -> <T as FixedSizedPod>::CanonicalType
Convert
self
to the canonical type.source§fn from_canonical_type(canonical: &<T as FixedSizedPod>::CanonicalType) -> T
fn from_canonical_type(canonical: &<T as FixedSizedPod>::CanonicalType) -> T
Convert the canonical type to
Self
.source§impl<T> PodSerialize for Twhere
T: FixedSizedPod,
impl<T> PodSerialize for Twhere
T: FixedSizedPod,
source§fn serialize<O>(
&self,
serializer: PodSerializer<O>
) -> Result<SerializeSuccess<O>, GenError>
fn serialize<O>( &self, serializer: PodSerializer<O> ) -> Result<SerializeSuccess<O>, GenError>
Serialize the type by using the provided
PodSerializer