Skip to main content

Position

Struct Position 

Source
pub struct Position<C, F, U>{ /* private fields */ }
Expand description

Re-export the algebraic types An affine point in 3D Cartesian coordinates.

Positions represent locations in space relative to a reference center (origin). Unlike vectors, positions do not form a vector space.

§Type Parameters

  • C: The reference center (e.g., Heliocentric, Geocentric, Topocentric)
  • F: The reference frame (e.g., ICRS, EclipticMeanJ2000, Equatorial)
  • U: The length unit (e.g., AstronomicalUnit, Kilometer)

§Center Parameters

Some centers (like Topocentric) require runtime parameters stored in C::Params. For most centers, Params = () (zero overhead).

Implementations§

Source§

impl<C, F, U> Position<C, F, U>

Source

pub fn new_with_params<T>( center_params: <C as ReferenceCenter>::Params, x: T, y: T, z: T, ) -> Position<C, F, U>
where T: Into<Quantity<U>>,

Creates a new position with explicit center parameters.

§Arguments
  • center_params: Runtime parameters for the center (e.g., ObserverSite for Topocentric)
  • x, y, z: Component values (converted to Quantity<U>)
Source

pub fn from_array( center_params: <C as ReferenceCenter>::Params, arr: [Quantity<U>; 3], ) -> Position<C, F, U>

Creates a position from a [Quantity<U>; 3] array with explicit center parameters.

Source

pub const fn new_const( center_params: <C as ReferenceCenter>::Params, x: Quantity<U>, y: Quantity<U>, z: Quantity<U>, ) -> Position<C, F, U>

Const constructor for use in const contexts.

Source

pub fn center_params(&self) -> &<C as ReferenceCenter>::Params

Returns a reference to the center parameters.

Source§

impl<C, F, U> Position<C, F, U>
where C: ReferenceCenter<Params = ()>, F: ReferenceFrame, U: LengthUnit,

Source

pub const CENTER: Position<C, F, U>

The origin of this coordinate system (all coordinates zero).

Source

pub fn new<T>(x: T, y: T, z: T) -> Position<C, F, U>
where T: Into<Quantity<U>>,

Creates a new position for centers with Params = ().

This is a convenience constructor that doesn’t require passing () explicitly.

§Example
use affn::cartesian::Position;
use affn::frames::ReferenceFrame;
use affn::centers::ReferenceCenter;
use qtty::units::Meter;

#[derive(Debug, Copy, Clone)]
struct WorldFrame;
impl ReferenceFrame for WorldFrame {
    fn frame_name() -> &'static str { "WorldFrame" }
}

#[derive(Debug, Copy, Clone)]
struct WorldOrigin;
impl ReferenceCenter for WorldOrigin {
    type Params = ();
    fn center_name() -> &'static str { "WorldOrigin" }
}

let pos = Position::<WorldOrigin, WorldFrame, Meter>::new(1.0, 0.0, 0.0);
Source

pub fn from_array_origin(arr: [Quantity<U>; 3]) -> Position<C, F, U>

Creates a position from a [Quantity<U>; 3] array for centers with Params = ().

Source§

impl<C, F, U> Position<C, F, U>

Source

pub fn x(&self) -> Quantity<U>

Returns the x-component.

Source

pub fn y(&self) -> Quantity<U>

Returns the y-component.

Source

pub fn z(&self) -> Quantity<U>

Returns the z-component.

Source

pub fn as_array(&self) -> &[Quantity<U>; 3]

Returns a reference to the underlying [Quantity<U>; 3] array.

Source

pub fn to_unit<U2>(&self) -> Position<C, F, U2>
where U2: LengthUnit, <C as ReferenceCenter>::Params: Clone,

Converts this position to another length unit.

The center and frame are preserved while each Cartesian component is converted independently via qtty::Quantity::to.

Source

pub fn reinterpret_frame<F2>(self) -> Position<C, F2, U>

Reinterprets this position as belonging to a different reference frame.

This is a zero-cost operation: the Cartesian components and center are preserved unchanged; only the compile-time frame tag F is replaced by F2.

§When to use

After applying a mathematical rotation (Rotation3 * position) whose result carries the original frame tag, call this method to assign the correct target frame tag.

// Rotate from EclipticMeanJ2000 into ICRS coordinates:
let rotated = rot * pos_ecl;           // still tagged EclipticMeanJ2000
let pos_icrs = rotated.reinterpret_frame::<ICRS>(); // now tagged ICRS
Source§

impl<C, F, U> Position<C, F, U>

Source

pub fn distance(&self) -> Quantity<U>

Computes the distance from the reference center.

Source

pub fn distance_to(&self, other: &Position<C, F, U>) -> Quantity<U>
where C: ReferenceCenter<Params = ()>,

Computes the distance to another position in the same center and frame.

§Panics

Panics if the two positions carry different center_params values. The panic message includes the center type name and a debug print of both center_params to aid diagnosis. For a non-panicking alternative, use try_distance_to, which returns a CenterParamsMismatchError instead.

§Note on Parameterized Centers

This method is only available when the center has no runtime parameters (C::Params = ()). For parameterized centers use the fallible try_distance_to instead.

Source

pub fn try_distance_to( &self, other: &Position<C, F, U>, ) -> Result<Quantity<U>, CenterParamsMismatchError>

Checked version of distance_to that returns Err instead of panicking when center parameters don’t match.

For centers with Params = (), this always succeeds.

Source

pub fn direction(&self) -> Option<Direction<F>>

Returns the direction (unit vector) from the center to this position.

Note: Directions are frame-only types (no center). This extracts the normalized direction of the position vector.

Returns None if the position is at the origin.

Source

pub fn direction_unchecked(&self) -> Direction<F>

Returns the direction, assuming non-zero distance from origin.

§Panics

May produce NaN if the position is at the origin.

Source

pub fn to_spherical(&self) -> Position<C, F, U>

Converts this Cartesian position to spherical coordinates.

Returns a spherical position with the same center and frame, with (polar, azimuth, distance) computed from (x, y, z).

Source

pub fn from_spherical(sph: &Position<C, F, U>) -> Position<C, F, U>

Constructs a Cartesian position from spherical coordinates.

This is equivalent to spherical_pos.to_cartesian().

Source§

impl<C, F, U> Position<C, F, U>

Source

pub fn checked_sub( &self, other: &Position<C, F, U>, ) -> Result<Vector<F, U>, CenterParamsMismatchError>

Checked subtraction that returns Err instead of panicking when center parameters don’t match.

This is the safe alternative to the Sub operator (pos_a - pos_b). For centers with Params = (), this always succeeds.

Trait Implementations§

Source§

impl<C, F, U> Add<&Vector<F, U>> for Position<C, F, U>

Source§

type Output = <Position<C, F, U> as Add<Vector<F, U>>>::Output

The resulting type after applying the + operator.
Source§

fn add( self, rhs: &Vector<F, U>, ) -> <Position<C, F, U> as Add<&Vector<F, U>>>::Output

Performs the + operation. Read more
Source§

impl<C, F, U> Add<&Vector<F, U>> for &Position<C, F, U>

Source§

type Output = <Position<C, F, U> as Add<Vector<F, U>>>::Output

The resulting type after applying the + operator.
Source§

fn add( self, rhs: &Vector<F, U>, ) -> <&Position<C, F, U> as Add<&Vector<F, U>>>::Output

Performs the + operation. Read more
Source§

impl<C, F, U> Add<Vector<F, U>> for Position<C, F, U>

Source§

fn add( self, displacement: Vector<F, U>, ) -> <Position<C, F, U> as Add<Vector<F, U>>>::Output

Translates the position by a displacement vector.

Source§

type Output = Position<C, F, U>

The resulting type after applying the + operator.
Source§

impl<C, F, U> Add<Vector<F, U>> for &Position<C, F, U>

Source§

type Output = <Position<C, F, U> as Add<Vector<F, U>>>::Output

The resulting type after applying the + operator.
Source§

fn add( self, rhs: Vector<F, U>, ) -> <&Position<C, F, U> as Add<Vector<F, U>>>::Output

Performs the + operation. Read more
Source§

impl<C, F, U> Clone for Position<C, F, U>

Source§

fn clone(&self) -> Position<C, F, U>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<C, F, U> Copy for Position<C, F, U>

Source§

impl<C, F, U> Debug for Position<C, F, U>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<'de, C, F, U> Deserialize<'de> for Position<C, F, U>

Source§

fn deserialize<D>( deserializer: D, ) -> Result<Position<C, F, U>, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<C, F, U> Display for Position<C, F, U>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<C, F, U> LowerExp for Position<C, F, U>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<C, F, U> PartialEq for Position<C, F, U>

Source§

fn eq(&self, other: &Position<C, F, U>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<C, F, U> PositionAstroExt<C, F, U> for Position<C, F, U>
where C: ReferenceCenter<Params = ()>, F: ReferenceFrame, U: LengthUnit,

Source§

fn to_frame<F2: ReferenceFrame>(&self, jd: &JulianDate) -> Position<C, F2, U>
where (): FrameRotationProvider<F, F2>,

Rotates this position to a new reference frame (IAU defaults).
Source§

fn to_frame_with<F2: ReferenceFrame, Ctx>( &self, jd: &JulianDate, ctx: &Ctx, ) -> Position<C, F2, U>

Rotates this position to a new reference frame with custom context.
Source§

fn to<C2: ReferenceCenter<Params = ()>, F2: ReferenceFrame>( &self, jd: &JulianDate, ) -> Position<C2, F2, U>
where (): CenterShiftProvider<C, C2, F> + FrameRotationProvider<F, F2>,

Transforms this position to a new center and frame (IAU defaults). Read more
Source§

fn to_with<C2: ReferenceCenter<Params = ()>, F2: ReferenceFrame, Ctx>( &self, jd: &JulianDate, ctx: &Ctx, ) -> Position<C2, F2, U>

Transforms this position to a new center and frame with custom context.
Source§

impl<C, F, U> Serialize for Position<C, F, U>

Source§

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
Source§

impl<C, F, U> Sub for Position<C, F, U>
where C: ReferenceCenter<Params = ()>, F: ReferenceFrame, U: LengthUnit,

Source§

fn sub(self, other: Position<C, F, U>) -> <Position<C, F, U> as Sub>::Output

Computes the displacement vector from other to self.

This operator is only available when the center has no runtime parameters (C::Params = ()), which is the case for the standard centers Geocentric, Heliocentric, Barycentric, etc. For parameterized centers (e.g., Topocentric) use the fallible Position::checked_sub instead.

Source§

type Output = Vector<F, U>

The resulting type after applying the - operator.
Source§

impl<C, F, U> Sub<&Position<C, F, U>> for &Position<C, F, U>
where C: ReferenceCenter<Params = ()>, F: ReferenceFrame, U: LengthUnit,

Source§

fn sub( self, other: &Position<C, F, U>, ) -> <&Position<C, F, U> as Sub<&Position<C, F, U>>>::Output

Computes the displacement vector from other to self.

Only available when C::Params = (). Use Position::checked_sub for parameterized centers.

Source§

type Output = Vector<F, U>

The resulting type after applying the - operator.
Source§

impl<C, F, U> Sub<&Position<C, F, U>> for Position<C, F, U>
where C: ReferenceCenter<Params = ()>, F: ReferenceFrame, U: LengthUnit,

Source§

type Output = <Position<C, F, U> as Sub>::Output

The resulting type after applying the - operator.
Source§

fn sub( self, rhs: &Position<C, F, U>, ) -> <Position<C, F, U> as Sub<&Position<C, F, U>>>::Output

Performs the - operation. Read more
Source§

impl<C, F, U> Sub<&Vector<F, U>> for Position<C, F, U>

Source§

type Output = <Position<C, F, U> as Sub<Vector<F, U>>>::Output

The resulting type after applying the - operator.
Source§

fn sub( self, rhs: &Vector<F, U>, ) -> <Position<C, F, U> as Sub<&Vector<F, U>>>::Output

Performs the - operation. Read more
Source§

impl<C, F, U> Sub<&Vector<F, U>> for &Position<C, F, U>

Source§

type Output = <Position<C, F, U> as Sub<Vector<F, U>>>::Output

The resulting type after applying the - operator.
Source§

fn sub( self, rhs: &Vector<F, U>, ) -> <&Position<C, F, U> as Sub<&Vector<F, U>>>::Output

Performs the - operation. Read more
Source§

impl<C, F, U> Sub<Position<C, F, U>> for &Position<C, F, U>
where C: ReferenceCenter<Params = ()>, F: ReferenceFrame, U: LengthUnit,

Source§

type Output = <Position<C, F, U> as Sub>::Output

The resulting type after applying the - operator.
Source§

fn sub( self, rhs: Position<C, F, U>, ) -> <&Position<C, F, U> as Sub<Position<C, F, U>>>::Output

Performs the - operation. Read more
Source§

impl<C, F, U> Sub<Vector<F, U>> for Position<C, F, U>

Source§

fn sub( self, displacement: Vector<F, U>, ) -> <Position<C, F, U> as Sub<Vector<F, U>>>::Output

Translates the position backwards by a displacement vector.

Source§

type Output = Position<C, F, U>

The resulting type after applying the - operator.
Source§

impl<C, F, U> Sub<Vector<F, U>> for &Position<C, F, U>

Source§

type Output = <Position<C, F, U> as Sub<Vector<F, U>>>::Output

The resulting type after applying the - operator.
Source§

fn sub( self, rhs: Vector<F, U>, ) -> <&Position<C, F, U> as Sub<Vector<F, U>>>::Output

Performs the - operation. Read more
Source§

impl<U: LengthUnit> TopocentricEquatorialExt<U> for Position<Topocentric, EquatorialTrueOfDate, U>

Source§

fn to_horizontal_position( &self, jd_ut1: &JulianDate, jd_tt: &JulianDate, ) -> Position<Topocentric, Horizontal, U>

Convert this topocentric equatorial position to horizontal coordinates. Read more
Source§

impl<U: LengthUnit> TopocentricHorizontalExt<U> for Position<Topocentric, Horizontal, U>

Source§

fn to_equatorial_position( &self, jd_ut1: &JulianDate, jd_tt: &JulianDate, ) -> Position<Topocentric, EquatorialTrueOfDate, U>

Convert this topocentric horizontal position to equatorial coordinates. Read more
Source§

impl<C1, C2, F1, F2, U> Transform<Position<C2, F2, U>> for Position<C1, F1, U>
where C1: ReferenceCenter<Params = ()>, C2: ReferenceCenter<Params = ()>, Position<C1, F2, U>: TransformCenter<C2, F2, U>, (): FrameRotationProvider<F1, F2>, F1: MutableFrame, F2: MutableFrame, U: LengthUnit,

Blanket implementation for Position transformations (center + frame changes).

Applies two transformations:

  1. Frame transformation (within the same center)
  2. Center transformation (within the rotated frame)

Restricted to standard centers (Params = ()) because combined transforms for Bodycentric or Topocentric require explicit parameter values. Use to_center directly for those cases.

Source§

fn transform(&self, jd: JulianDate) -> Position<C2, F2, U>

Transform this coordinate to a different center and/or frame. Read more
Source§

impl<U: LengthUnit> Transform<Position<Topocentric, EquatorialMeanOfDate, U>> for Position<Topocentric, Horizontal, U>

Transform from Horizontal to EquatorialMeanOfDate frame for Topocentric coordinates.

Source§

fn transform( &self, jd: JulianDate, ) -> Position<Topocentric, EquatorialMeanOfDate, U>

Transform this coordinate to a different center and/or frame. Read more
Source§

impl<U: LengthUnit> Transform<Position<Topocentric, Horizontal, U>> for Position<Topocentric, EquatorialMeanOfDate, U>

Transform from EquatorialMeanOfDate to Horizontal frame for Topocentric coordinates.

This transformation requires the Julian Date to compute the local sidereal time. The observer’s site information is taken from the coordinate’s center params.

Source§

fn transform(&self, jd: JulianDate) -> Position<Topocentric, Horizontal, U>

Transform this coordinate to a different center and/or frame. Read more
Source§

impl<F: MutableFrame, U: LengthUnit> TransformCenter<Bodycentric, F, U> for Position<Geocentric, F, U>

Source§

fn to_center_as<Eph: Ephemeris, Eop: EopProvider, Nut: NutationModel>( &self, body_params: BodycentricParams, jd: JulianDate, _ctx: &AstroContext<Eph, Eop>, ) -> Position<Bodycentric, F, U>

Transform to the target center with an explicit compile-time nutation model.
Source§

fn to_center<A: IntoTransformArgs<C2::Params>>( &self, args: A, ) -> Position<C2, F, U>
where Self: Sized,

Transform to the target center using the default ephemeris / EOP. Read more
Source§

fn to_center_with<Ctx>( &self, params: C2::Params, jd: JulianDate, ctx: &Ctx, ) -> Position<C2, F, U>
where Ctx: TransformContext, Ctx::Eph: Ephemeris, Self: Sized,

Transform to the target center with a custom transform context. Read more
Source§

impl<F: MutableFrame, U: LengthUnit> TransformCenter<Bodycentric, F, U> for Position<Heliocentric, F, U>

Source§

fn to_center_as<Eph: Ephemeris, Eop: EopProvider, Nut: NutationModel>( &self, body_params: BodycentricParams, jd: JulianDate, _ctx: &AstroContext<Eph, Eop>, ) -> Position<Bodycentric, F, U>

Transform to the target center with an explicit compile-time nutation model.
Source§

fn to_center<A: IntoTransformArgs<C2::Params>>( &self, args: A, ) -> Position<C2, F, U>
where Self: Sized,

Transform to the target center using the default ephemeris / EOP. Read more
Source§

fn to_center_with<Ctx>( &self, params: C2::Params, jd: JulianDate, ctx: &Ctx, ) -> Position<C2, F, U>
where Ctx: TransformContext, Ctx::Eph: Ephemeris, Self: Sized,

Transform to the target center with a custom transform context. Read more
Source§

impl<F: MutableFrame, U: LengthUnit> TransformCenter<Bodycentric, F, U> for Position<Barycentric, F, U>

Source§

fn to_center_as<Eph: Ephemeris, Eop: EopProvider, Nut: NutationModel>( &self, body_params: BodycentricParams, jd: JulianDate, _ctx: &AstroContext<Eph, Eop>, ) -> Position<Bodycentric, F, U>

Transform to the target center with an explicit compile-time nutation model.
Source§

fn to_center<A: IntoTransformArgs<C2::Params>>( &self, args: A, ) -> Position<C2, F, U>
where Self: Sized,

Transform to the target center using the default ephemeris / EOP. Read more
Source§

fn to_center_with<Ctx>( &self, params: C2::Params, jd: JulianDate, ctx: &Ctx, ) -> Position<C2, F, U>
where Ctx: TransformContext, Ctx::Eph: Ephemeris, Self: Sized,

Transform to the target center with a custom transform context. Read more
Source§

impl<C1, C2, F, U> TransformCenter<C2, F, U> for Position<C1, F, U>
where C1: ReferenceCenter<Params = ()>, C2: ReferenceCenter<Params = ()>, F: ReferenceFrame, U: LengthUnit, (): CenterShiftProvider<C1, C2, F>,

Blanket implementation covering all standard-center pairs (Barycentric ↔ Heliocentric ↔ Geocentric, and identity).

The shift vector is looked up from CenterShiftProvider, which consults the configured ephemeris. No extra concrete per-pair impl is needed; deleting the old to_barycentric.rs, to_geocentric.rs, and to_heliocentric.rs files is intentional.

Source§

fn to_center_as<Eph: Ephemeris, Eop: EopProvider, Nut: NutationModel>( &self, _params: (), jd: JulianDate, ctx: &AstroContext<Eph, Eop>, ) -> Position<C2, F, U>

Transform to the target center with an explicit compile-time nutation model.
Source§

fn to_center<A: IntoTransformArgs<C2::Params>>( &self, args: A, ) -> Position<C2, F, U>
where Self: Sized,

Transform to the target center using the default ephemeris / EOP. Read more
Source§

fn to_center_with<Ctx>( &self, params: C2::Params, jd: JulianDate, ctx: &Ctx, ) -> Position<C2, F, U>
where Ctx: TransformContext, Ctx::Eph: Ephemeris, Self: Sized,

Transform to the target center with a custom transform context. Read more
Source§

impl<F: MutableFrame, U: LengthUnit> TransformCenter<Geocentric, F, U> for Position<Bodycentric, F, U>

Source§

fn to_center_as<Eph: Ephemeris, Eop: EopProvider, Nut: NutationModel>( &self, _params: (), jd: JulianDate, _ctx: &AstroContext<Eph, Eop>, ) -> Position<Geocentric, F, U>

Transform to the target center with an explicit compile-time nutation model.
Source§

fn to_center<A: IntoTransformArgs<C2::Params>>( &self, args: A, ) -> Position<C2, F, U>
where Self: Sized,

Transform to the target center using the default ephemeris / EOP. Read more
Source§

fn to_center_with<Ctx>( &self, params: C2::Params, jd: JulianDate, ctx: &Ctx, ) -> Position<C2, F, U>
where Ctx: TransformContext, Ctx::Eph: Ephemeris, Self: Sized,

Transform to the target center with a custom transform context. Read more
Source§

impl<F: MutableFrame, U: LengthUnit> TransformCenter<Geocentric, F, U> for Position<Topocentric, F, U>

Source§

fn to_center_as<Eph: Ephemeris, Eop: EopProvider, Nut: NutationModel>( &self, _params: (), jd: JulianDate, _ctx: &AstroContext<Eph, Eop>, ) -> Position<Geocentric, F, U>

Inverse parallax: recovers the geocentric position from topocentric.

The observer site is read from the stored center params.

Source§

fn to_center<A: IntoTransformArgs<C2::Params>>( &self, args: A, ) -> Position<C2, F, U>
where Self: Sized,

Transform to the target center using the default ephemeris / EOP. Read more
Source§

fn to_center_with<Ctx>( &self, params: C2::Params, jd: JulianDate, ctx: &Ctx, ) -> Position<C2, F, U>
where Ctx: TransformContext, Ctx::Eph: Ephemeris, Self: Sized,

Transform to the target center with a custom transform context. Read more
Source§

impl<F: MutableFrame, U: LengthUnit> TransformCenter<Topocentric, F, U> for Position<Geocentric, F, U>

Source§

fn to_center_as<Eph: Ephemeris, Eop: EopProvider, Nut: NutationModel>( &self, params: Geodetic<ECEF>, jd: JulianDate, ctx: &AstroContext<Eph, Eop>, ) -> Position<Topocentric, F, U>

Transform to the target center with an explicit compile-time nutation model.
Source§

fn to_center<A: IntoTransformArgs<C2::Params>>( &self, args: A, ) -> Position<C2, F, U>
where Self: Sized,

Transform to the target center using the default ephemeris / EOP. Read more
Source§

fn to_center_with<Ctx>( &self, params: C2::Params, jd: JulianDate, ctx: &Ctx, ) -> Position<C2, F, U>
where Ctx: TransformContext, Ctx::Eph: Ephemeris, Self: Sized,

Transform to the target center with a custom transform context. Read more
Source§

impl<C: ReferenceCenter, U> TransformFrame<Position<C, EclipticMeanJ2000, U>> for Position<C, ICRS, U>
where U: LengthUnit,

Source§

impl<C: ReferenceCenter, U: LengthUnit> TransformFrame<Position<C, EclipticMeanJ2000, U>> for Position<C, EquatorialMeanJ2000, U>

Source§

impl<C: ReferenceCenter, U: LengthUnit> TransformFrame<Position<C, EquatorialMeanJ2000, U>> for Position<C, EclipticMeanJ2000, U>

Rotate an ecliptic‐J2000 Cartesian vector into the mean equatorial‐J2000 frame.

Source§

impl<C: ReferenceCenter, U: LengthUnit> TransformFrame<Position<C, EquatorialMeanJ2000, U>> for Position<C, ICRS, U>

Source§

impl<C, F, U> TransformFrame<Position<C, F, U>> for Position<C, F, U>

Source§

fn to_frame(&self) -> Position<C, F, U>

Source§

impl<C: ReferenceCenter, U: LengthUnit> TransformFrame<Position<C, ICRS, U>> for Position<C, EclipticMeanJ2000, U>

Source§

fn to_frame(&self) -> Position<C, ICRS, U>

Source§

impl<C: ReferenceCenter, U: LengthUnit> TransformFrame<Position<C, ICRS, U>> for Position<C, EquatorialMeanJ2000, U>

Source§

fn to_frame(&self) -> Position<C, ICRS, U>

Source§

impl<C, F, U> UpperExp for Position<C, F, U>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<C, F, U> Freeze for Position<C, F, U>
where <C as ReferenceCenter>::Params: Freeze,

§

impl<C, F, U> RefUnwindSafe for Position<C, F, U>

§

impl<C, F, U> Send for Position<C, F, U>
where <C as ReferenceCenter>::Params: Send, F: Send, U: Send,

§

impl<C, F, U> Sync for Position<C, F, U>
where <C as ReferenceCenter>::Params: Sync, F: Sync, U: Sync,

§

impl<C, F, U> Unpin for Position<C, F, U>
where <C as ReferenceCenter>::Params: Unpin, F: Unpin, U: Unpin,

§

impl<C, F, U> UnsafeUnpin for Position<C, F, U>

§

impl<C, F, U> UnwindSafe for Position<C, F, U>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> UsingEngine for T

Source§

fn using<'a, Ctx>(&'a self, engine: &'a Ctx) -> WithEngine<'a, Self, Ctx>
where Ctx: TransformContext,

Wrap this coordinate with a custom transform context for the next transformation call.