Trait DynamicDataMarker
trait DynamicDataMarker: 'static
Trait marker for data structs. All types delivered by the data provider must be associated with something implementing this trait.
Data markers normally generated with the data_marker macro.
Also see DataMarker.
Note: DynamicDataMarkers 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).
Examples
Manually implementing DynamicDataMarker for a custom type:
use *;
use Cow;
;
// We can now use MyDataStruct with DataProvider:
let s = MyDataStruct ;
let payload = from_owned;
assert_eq!;
Associated Types
type DataStruct: TraitBound { trait_: Path { path: "Yokeable", id: Id(202), args: Some(AngleBracketed { args: [Lifetime("'a")], constraints: [] }) }, generic_params: [GenericParamDef { name: "'a", kind: Lifetime { outlives: [] } }], modifier: None }A type that implements
Yokeable. This should typically be the'staticversion of a data struct.
Implementors
impl DynamicDataMarker for BufferMarkerimpl<DataStruct: for<'a> Yokeable<'a>> DynamicDataMarker for ErasedMarker<DataStruct>impl<Y> DynamicDataMarker for NeverMarker<Y>