Skip to main content

ContextConversionTarget

Trait ContextConversionTarget 

Source
pub trait ContextConversionTarget<S: Scale, SrcF: TimeFormat = J2000s>: Sealed {
    type Output;

    // Required method
    fn convert_with(
        src: Time<S, SrcF>,
        ctx: &TimeContext,
    ) -> Result<Self::Output, ConversionError>;
}
Expand description

Unified context-backed conversion target for Time<S, F>::to_with::<T>(&ctx).

Required Associated Types§

Required Methods§

Source

fn convert_with( src: Time<S, SrcF>, ctx: &TimeContext, ) -> Result<Self::Output, ConversionError>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<S1: Scale + ContextScaleConvert<S2>, S2: Scale, SrcF: TimeFormat> ContextConversionTarget<S1, SrcF> for S2

Source§

type Output = Time<S2, SrcF>

Source§

impl<S: Scale + ContextScaleConvert<TAI>, SrcF: TimeFormat> ContextConversionTarget<S, SrcF> for GPS

Source§

impl<S: Scale + ContextScaleConvert<UTC>, SrcF: TimeFormat> ContextConversionTarget<S, SrcF> for Unix