Struct SpacetimeCoord
#[repr(C)]pub struct SpacetimeCoord {
pub x: f32,
pub y: f32,
pub z: f32,
pub t: f32,
}Expand description
4D Spacetime coordinate (x, y, z, t) in single-precision floats (16 bytes, #[repr(C)]).
Fields§
§x: f32§y: f32§z: f32§t: f32Implementations§
§impl SpacetimeCoord
impl SpacetimeCoord
pub fn spatial_distance(&self, other: &SpacetimeCoord) -> f32
pub fn spatial_distance(&self, other: &SpacetimeCoord) -> f32
Euclidean spatial distance in 3D (x, y, z).
Trait Implementations§
§impl Clone for SpacetimeCoord
impl Clone for SpacetimeCoord
§fn clone(&self) -> SpacetimeCoord
fn clone(&self) -> SpacetimeCoord
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SpacetimeCoord
§impl Debug for SpacetimeCoord
impl Debug for SpacetimeCoord
§impl Default for SpacetimeCoord
impl Default for SpacetimeCoord
§fn default() -> SpacetimeCoord
fn default() -> SpacetimeCoord
Returns the “default value” for a type. Read more
§impl<'de> Deserialize<'de> for SpacetimeCoord
impl<'de> Deserialize<'de> for SpacetimeCoord
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SpacetimeCoord, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SpacetimeCoord, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl PartialEq for SpacetimeCoord
impl PartialEq for SpacetimeCoord
impl Pod for SpacetimeCoord
§impl Serialize for SpacetimeCoord
impl Serialize for SpacetimeCoord
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for SpacetimeCoord
Auto Trait Implementations§
impl Freeze for SpacetimeCoord
impl RefUnwindSafe for SpacetimeCoord
impl Send for SpacetimeCoord
impl Sync for SpacetimeCoord
impl Unpin for SpacetimeCoord
impl UnsafeUnpin for SpacetimeCoord
impl UnwindSafe for SpacetimeCoord
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
impl<T> AnyBitPattern for Twhere
T: Pod,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
impl<T> Interleave for Twhere
T: Pod,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> NoUninit for Twhere
T: Pod,
§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.