Trait icu_provider::DataMarker
source · pub trait DataMarker: DynamicDataMarker {
const INFO: DataMarkerInfo;
// Provided method
fn bind<P>(provider: P) -> DataProviderWithMarker<Self, P>
where P: DataProvider<Self>,
Self: Sized { ... }
}
Expand description
A DynamicDataMarker
with a DataMarkerInfo
attached.
Structs implementing this trait are normally generated with the data_struct!
macro.
Implementing this trait enables this marker to be used with the main DataProvider
trait.
Most markers should be associated with a specific marker and should therefore implement this
trait.
BufferMarker
and AnyMarker
are examples of markers that do not implement this trait
because they are not specific to a single marker.
Note: DataMarker
s are quasi-const-generic compile-time objects, and as such are expected
to be unit structs. As this is not something that can be enforced by the type system, we
currently only have a 'static
bound on them (which is needed by a lot of our code).
Required Associated Constants§
sourceconst INFO: DataMarkerInfo
const INFO: DataMarkerInfo
The single DataMarkerInfo
associated with this marker.
Provided Methods§
sourcefn bind<P>(provider: P) -> DataProviderWithMarker<Self, P>where
P: DataProvider<Self>,
Self: Sized,
fn bind<P>(provider: P) -> DataProviderWithMarker<Self, P>where
P: DataProvider<Self>,
Self: Sized,
Binds this DataMarker
to a provider supporting it.