icu_datetime::scaffold

Trait MaybePayload

Source
pub trait MaybePayload<M: DynamicDataMarker, Variables>: UnstableSealed {
    // Required methods
    fn new_empty() -> Self;
    fn load_put<P>(
        &mut self,
        provider: &P,
        req: DataRequest<'_>,
        variables: Variables,
    ) -> Result<Result<DataResponseMetadata, DataError>, MaybePayloadError>
       where P: BoundDataProvider<M> + ?Sized,
             Self: Sized;
    fn get(&self) -> DataPayloadWithVariablesBorrowed<'_, M, Variables>;
}
Expand description

A type that may or may not be a [DataPayload] and may or may not contain a value depending on the type parameter Variables.

Helper trait for DateTimeNamesMarker.

🚧 This trait is considered unstable; it may change at any time, in breaking or non-breaking ways, including in SemVer minor releases. Do not implement this trait in userland unless you are prepared for things to occasionally break.

Required Methods§

Source

fn new_empty() -> Self

Source

fn load_put<P>( &mut self, provider: &P, req: DataRequest<'_>, variables: Variables, ) -> Result<Result<DataResponseMetadata, DataError>, MaybePayloadError>
where P: BoundDataProvider<M> + ?Sized, Self: Sized,

Source

fn get(&self) -> DataPayloadWithVariablesBorrowed<'_, M, Variables>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<M: DynamicDataMarker, Variables> MaybePayload<M, Variables> for ()

Source§

fn new_empty() -> Self

Source§

fn load_put<P>( &mut self, _: &P, _: DataRequest<'_>, _: Variables, ) -> Result<Result<DataResponseMetadata, DataError>, MaybePayloadError>
where P: BoundDataProvider<M> + ?Sized, Self: Sized,

Source§

fn get(&self) -> DataPayloadWithVariablesBorrowed<'_, M, Variables>

Implementors§

Source§

impl<M: DynamicDataMarker, Variables> MaybePayload<M, Variables> for DataPayloadWithVariables<M, Variables>
where Variables: PartialEq + Copy,