pub trait DefaultMarker {
type Marker: ToGraphqlFilter + Marker<Marked = Self>;
}Expand description
The marker a field’s type carries when the declaration names none.
This is the INFERENCE, and it is what keeps the common case free of annotation: an expansion projects a domain type through here, so a field whose type has one sensible reading is declared exactly as it was before markers existed.
The associated type carries ToGraphqlFilter as an item bound so that
a registration naming a marker nothing answers for fails AT the registration, rather than at the
first declaration that happens to use the type. It is also the one place this module names the
GraphQL axis — see the module note, where dropping the bound is measured: the crate still
compiles and the compile_fail example below stops failing.
It carries Marker<Marked = Self> beside it, which is a LAW and not only a bound: the marker a
type defaults to must be an interpretation OF THAT TYPE. Nothing said so before, and
type Marker = ScalarMarker<SomethingElse> was a well-formed row.
Saying it is what makes a composed marker’s default checkable. NullableMarker<Option<T>>
resolves its inner half to <T as DefaultMarker>::Marker and then has to prove that half marks
T — which for an abstract T is provable only from the item bound. Without it the equality is
an opaque projection and the blanket over Option<T> is E0271, measured on the way in.
That is what keeps the two halves of a registration from drifting. type Marker = StringMarker<Reel> is well formed only while Reel: StringFilterMarker, so a row whose family
impl says one thing and whose default says another is E0277 on the line that wrote it —
measured, and pinned by the compile_fail example below.
struct Reel;
impl ingraph::ScalarFilterMarker for Reel {
type Filter = ingraph::ScalarFilter<Reel>;
}
// The halves disagree: `Reel` answers the scalar family and the default names the string one.
impl ingraph::DefaultMarker for Reel {
type Marker = ingraph::StringMarker<Reel>;
}Required Associated Types§
Sourcetype Marker: ToGraphqlFilter + Marker<Marked = Self>
type Marker: ToGraphqlFilter + Marker<Marked = Self>
The interpretation this type is read under by default.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl DefaultMarker for Bytes
impl DefaultMarker for Bytes
type Marker = BytesMarker<Bytes>
type Marker = BytesMarker<RawBytes<Shared>>
Source§impl DefaultMarker for Date
impl DefaultMarker for Date
type Marker = ScalarMarker<Date>
Source§impl DefaultMarker for DateTime
impl DefaultMarker for DateTime
type Marker = ScalarMarker<DateTime>
Source§impl DefaultMarker for IpAddr
impl DefaultMarker for IpAddr
type Marker = ScalarMarker<IpAddr>
Source§impl DefaultMarker for Ipv4Addr
impl DefaultMarker for Ipv4Addr
type Marker = ScalarMarker<Ipv4Addr>
Source§impl DefaultMarker for Ipv6Addr
impl DefaultMarker for Ipv6Addr
type Marker = ScalarMarker<Ipv6Addr>
Source§impl DefaultMarker for NonZeroI8
impl DefaultMarker for NonZeroI8
Source§impl DefaultMarker for NonZeroI16
impl DefaultMarker for NonZeroI16
Source§impl DefaultMarker for NonZeroI32
impl DefaultMarker for NonZeroI32
Source§impl DefaultMarker for NonZeroI64
impl DefaultMarker for NonZeroI64
Source§impl DefaultMarker for NonZeroI128
impl DefaultMarker for NonZeroI128
Source§impl DefaultMarker for NonZeroU8
impl DefaultMarker for NonZeroU8
Source§impl DefaultMarker for NonZeroU16
impl DefaultMarker for NonZeroU16
Source§impl DefaultMarker for NonZeroU32
impl DefaultMarker for NonZeroU32
Source§impl DefaultMarker for NonZeroU64
impl DefaultMarker for NonZeroU64
Source§impl DefaultMarker for NonZeroU128
impl DefaultMarker for NonZeroU128
Source§impl DefaultMarker for Offset
impl DefaultMarker for Offset
type Marker = ScalarMarker<Offset>
Source§impl DefaultMarker for Regex
impl DefaultMarker for Regex
type Marker = ScalarMarker<Regex>
Source§impl DefaultMarker for SignedDuration
impl DefaultMarker for SignedDuration
Source§impl DefaultMarker for SmolStr
impl DefaultMarker for SmolStr
type Marker = StringMarker<SmolStr>
Source§impl DefaultMarker for SocketAddr
impl DefaultMarker for SocketAddr
type Marker = ScalarMarker<SocketAddr>
Source§impl DefaultMarker for SocketAddrV4
impl DefaultMarker for SocketAddrV4
type Marker = ScalarMarker<SocketAddrV4>
Source§impl DefaultMarker for SocketAddrV6
impl DefaultMarker for SocketAddrV6
type Marker = ScalarMarker<SocketAddrV6>
Source§impl DefaultMarker for String
impl DefaultMarker for String
type Marker = StringMarker<String>
Source§impl DefaultMarker for Time
impl DefaultMarker for Time
type Marker = ScalarMarker<Time>
Source§impl DefaultMarker for Timestamp
impl DefaultMarker for Timestamp
type Marker = ScalarMarker<Timestamp>
Source§impl DefaultMarker for Uuid
impl DefaultMarker for Uuid
type Marker = ScalarMarker<Uuid>
Source§impl DefaultMarker for Zoned
impl DefaultMarker for Zoned
type Marker = ScalarMarker<Zoned>
Source§impl DefaultMarker for bool
impl DefaultMarker for bool
type Marker = BoolMarker<bool>
Source§impl DefaultMarker for f32
impl DefaultMarker for f32
type Marker = ScalarMarker<f32>
Source§impl DefaultMarker for f64
impl DefaultMarker for f64
type Marker = ScalarMarker<f64>
Source§impl DefaultMarker for i8
impl DefaultMarker for i8
type Marker = ScalarMarker<i8>
Source§impl DefaultMarker for i16
impl DefaultMarker for i16
type Marker = ScalarMarker<i16>
Source§impl DefaultMarker for i32
impl DefaultMarker for i32
type Marker = ScalarMarker<i32>
Source§impl DefaultMarker for i64
impl DefaultMarker for i64
type Marker = ScalarMarker<i64>
Source§impl DefaultMarker for i128
impl DefaultMarker for i128
type Marker = ScalarMarker<i128>
Source§impl DefaultMarker for u8
impl DefaultMarker for u8
type Marker = ScalarMarker<u8>
Source§impl DefaultMarker for u16
impl DefaultMarker for u16
type Marker = ScalarMarker<u16>
Source§impl DefaultMarker for u32
impl DefaultMarker for u32
type Marker = ScalarMarker<u32>
Source§impl DefaultMarker for u64
impl DefaultMarker for u64
type Marker = ScalarMarker<u64>
Source§impl DefaultMarker for u128
impl DefaultMarker for u128
type Marker = ScalarMarker<u128>
Source§impl<T: DefaultMarker> DefaultMarker for Option<T>
An Option is read as whatever the interpretation under it says an Option of it is read as —
one blanket over every T, asking Marker::UnderOption rather than naming a wrapper.
impl<T: DefaultMarker> DefaultMarker for Option<T>
An Option is read as whatever the interpretation under it says an Option of it is read as —
one blanket over every T, asking Marker::UnderOption rather than naming a wrapper.
The FAMILY is what answers, so Option<String> is a nullable text column and Option<Vec<Tag>>
is a list. Naming NullableMarker here made the second one a Nullable<ListFilter<…>>, whose
null test lowers to IS NULL against the table the record is kept in — which has no such column,
a collection being kept beside it. The ruling is Marker::UnderOption’s; this row is where it
is read, which is what makes a declaration naming marker = list and one naming nothing agree by
construction.
One impl where the registry carried two rows per registered type (Option<T> and
Option<Vec<T>>), and it reaches every type the map does — a downstream’s own included, which
impl DefaultMarker for Option<TheirType> cannot (E0117).
§The bound is HERE and not on Marker::UnderOption
This trait requires its answer to resolve to a filter, and Marker promises no such thing on
purpose: it is unconditional, so a marker over a type answering no family still says what it
marks. An item bound of ToGraphqlFilter there would put each family’s
own bound on each of those impls and take that away. Stated here it costs nothing at a concrete
type, which is what an expansion projects.
type Marker = <<T as DefaultMarker>::Marker as Marker>::UnderOption
Source§impl<T: DefaultVecMarker> DefaultMarker for Vec<T>
impl<T: DefaultVecMarker> DefaultMarker for Vec<T>
type Marker = <T as DefaultVecMarker>::Marker
Implementors§
Source§impl DefaultMarker for AudioCodec
Available on crate feature mediaframe only.The interpretation a AudioCodec field is read under: the framework’s COMPOSITE reading, which is the VALUE family’s member for one value occupying a column of its own.
impl DefaultMarker for AudioCodec
mediaframe only.The interpretation a AudioCodec field is read under: the framework’s COMPOSITE reading, which is the VALUE family’s member for one value occupying a column of its own.
Its Marker::UnderOption is
NullableMarker and not the collection reading: a codec occupies a
column OF ITS OWN, so it can be NULL and the null state is a real observable — a track
whose codec the demuxer could not name is not a track encoded with a codec called nothing.
type Marker = CompositeMarker<AudioCodec>
Source§impl DefaultMarker for BarcodePayloadKind
The interpretation a BarcodePayloadKind field is read under — the ENUM family’s, which is
what puts Option<BarcodePayloadKind> on the isNull road.
impl DefaultMarker for BarcodePayloadKind
The interpretation a BarcodePayloadKind field is read under — the ENUM family’s, which is
what puts Option<BarcodePayloadKind> on the isNull road.
Source§impl DefaultMarker for Count
impl DefaultMarker for Count
type Marker = ScalarMarker<Count>
Source§impl DefaultMarker for DetectedLanguage
Available on crate feature derive only.The interpretation a DetectedLanguage field is read under — LanguageId’s reading, and
this crate no longer mints either: a detection occupies five columns OF ITS OWN, so all five can
be absent together, which is exactly the VALUE family CompositeMarker names.
impl DefaultMarker for DetectedLanguage
derive only.The interpretation a DetectedLanguage field is read under — LanguageId’s reading, and
this crate no longer mints either: a detection occupies five columns OF ITS OWN, so all five can
be absent together, which is exactly the VALUE family CompositeMarker names.
Source§impl DefaultMarker for Detection
The interpretation a Detection field is read under — the COMPOSITE reading, because the value
occupies columns of its own and both can be absent together.
impl DefaultMarker for Detection
The interpretation a Detection field is read under — the COMPOSITE reading, because the value
occupies columns of its own and both can be absent together.
type Marker = CompositeMarker<Detection>
Source§impl DefaultMarker for Label
The interpretation a Label field is read under — the TEXT family’s, which is what puts
Option<Label> on the isNull road rather than on a collection’s.
impl DefaultMarker for Label
The interpretation a Label field is read under — the TEXT family’s, which is what puts
Option<Label> on the isNull road rather than on a collection’s.
type Marker = StringMarker<Label>
Source§impl DefaultMarker for Language
Available on crate feature derive only.The interpretation a Language field is read under: the framework’s COMPOSITE reading, which is the VALUE family’s member for one value occupying a column of its own.
impl DefaultMarker for Language
derive only.The interpretation a Language field is read under: the framework’s COMPOSITE reading, which is the VALUE family’s member for one value occupying a column of its own.
This crate used to MINT the marker here — a local marker type with its own
Marker row — because none of the framework’s family words named this
filter, the filter being ScalarFilter under a reading this crate declares.
CompositeMarker is the family that was missing, and the row
above is the answer the mint existed to supply.
Its Marker::UnderOption is
NullableMarker and not the collection reading: a subtag occupies
a column OF ITS OWN, so it can be NULL and the null state is a real observable — a track
whose language nobody recorded is not a track whose language is und.
type Marker = CompositeMarker<Language>
Source§impl DefaultMarker for LanguageId
Available on crate feature derive only.The interpretation a LanguageId field is read under — Language’s reading, and this crate
no longer mints either: an identity occupies four columns OF ITS OWN, so all four can be absent
together, which is exactly the VALUE family CompositeMarker names — a track nobody tagged is
not a track tagged und.
impl DefaultMarker for LanguageId
derive only.The interpretation a LanguageId field is read under — Language’s reading, and this crate
no longer mints either: an identity occupies four columns OF ITS OWN, so all four can be absent
together, which is exactly the VALUE family CompositeMarker names — a track nobody tagged is
not a track tagged und.
type Marker = CompositeMarker<LanguageId>
Source§impl DefaultMarker for LocalTimestamp
Available on crate features derive and time only.The interpretation a LocalTimestamp field is read under: it occupies columns of its own and
all of them can be absent together, which is exactly the VALUE family CompositeMarker names.
impl DefaultMarker for LocalTimestamp
derive and time only.The interpretation a LocalTimestamp field is read under: it occupies columns of its own and
all of them can be absent together, which is exactly the VALUE family CompositeMarker names.
Source§impl DefaultMarker for MediaTimeRange
Available on crate feature mediatime only.The interpretation a MediaTimeRange field is read under — the framework’s COMPOSITE reading, the
third of the citizens to take it and for their reason.
impl DefaultMarker for MediaTimeRange
mediatime only.The interpretation a MediaTimeRange field is read under — the framework’s COMPOSITE reading, the
third of the citizens to take it and for their reason.
Source§impl DefaultMarker for MediaTimestamp
Available on crate feature mediatime only.The interpretation a MediaTimestamp field is read under — Timebase’s reading, and this crate
no longer mints either: a timestamp occupies columns of its own and all of them can be absent
together, which is exactly the VALUE family CompositeMarker names.
impl DefaultMarker for MediaTimestamp
mediatime only.The interpretation a MediaTimestamp field is read under — Timebase’s reading, and this crate
no longer mints either: a timestamp occupies columns of its own and all of them can be absent
together, which is exactly the VALUE family CompositeMarker names.
Source§impl DefaultMarker for NormCoord
impl DefaultMarker for NormCoord
type Marker = ScalarMarker<NormCoord>
Source§impl DefaultMarker for Rate
Available on crate feature mediatime only.
impl DefaultMarker for Rate
mediatime only.type Marker = CompositeMarker<Rate>
Source§impl DefaultMarker for Region
Available on crate feature derive only.The interpretation a Region field is read under: the framework’s COMPOSITE reading, which is the VALUE family’s member for one value occupying a column of its own.
impl DefaultMarker for Region
derive only.The interpretation a Region field is read under: the framework’s COMPOSITE reading, which is the VALUE family’s member for one value occupying a column of its own.
This crate used to MINT the marker here — a local marker type with its own
Marker row — because none of the framework’s family words named this
filter, the filter being ScalarFilter under a reading this crate declares.
CompositeMarker is the family that was missing, and the row
above is the answer the mint existed to supply.
Its Marker::UnderOption is
NullableMarker and not the collection reading: a subtag occupies
a column OF ITS OWN, so it can be NULL and the null state is a real observable — a track
whose language nobody recorded is not a track whose language is und.
type Marker = CompositeMarker<Region>
Source§impl DefaultMarker for ScriptSubtag
Available on crate feature derive only.The interpretation a ScriptSubtag field is read under: the framework’s COMPOSITE reading, which is the VALUE family’s member for one value occupying a column of its own.
impl DefaultMarker for ScriptSubtag
derive only.The interpretation a ScriptSubtag field is read under: the framework’s COMPOSITE reading, which is the VALUE family’s member for one value occupying a column of its own.
This crate used to MINT the marker here — a local marker type with its own
Marker row — because none of the framework’s family words named this
filter, the filter being ScalarFilter under a reading this crate declares.
CompositeMarker is the family that was missing, and the row
above is the answer the mint existed to supply.
Its Marker::UnderOption is
NullableMarker and not the collection reading: a subtag occupies
a column OF ITS OWN, so it can be NULL and the null state is a real observable — a track
whose language nobody recorded is not a track whose language is und.
type Marker = CompositeMarker<ScriptSubtag>
Source§impl DefaultMarker for SubtitleCodec
Available on crate feature mediaframe only.The interpretation a SubtitleCodec field is read under: the framework’s COMPOSITE reading, which is the VALUE family’s member for one value occupying a column of its own.
impl DefaultMarker for SubtitleCodec
mediaframe only.The interpretation a SubtitleCodec field is read under: the framework’s COMPOSITE reading, which is the VALUE family’s member for one value occupying a column of its own.
Its Marker::UnderOption is
NullableMarker and not the collection reading: a codec occupies a
column OF ITS OWN, so it can be NULL and the null state is a real observable — a track
whose codec the demuxer could not name is not a track encoded with a codec called nothing.
Source§impl DefaultMarker for Symbology
The interpretation a Symbology field is read under — the ENUM family’s, which is what puts
Option<Symbology> on the isNull road.
impl DefaultMarker for Symbology
The interpretation a Symbology field is read under — the ENUM family’s, which is what puts
Option<Symbology> on the isNull road.
type Marker = EnumMarker<Symbology>
Source§impl DefaultMarker for TimeRange
The interpretation a TimeRange field is read under — the framework’s COMPOSITE reading, which
is the honest one for a value occupying FOUR columns OF ITS OWN: all four can be absent together,
which is exactly the VALUE family CompositeMarker names.
impl DefaultMarker for TimeRange
The interpretation a TimeRange field is read under — the framework’s COMPOSITE reading, which
is the honest one for a value occupying FOUR columns OF ITS OWN: all four can be absent together,
which is exactly the VALUE family CompositeMarker names.
type Marker = CompositeMarker<TimeRange>
Source§impl DefaultMarker for Timebase
Available on crate feature mediatime only.The interpretation a Timebase field is read under: the framework’s COMPOSITE reading, which
is the VALUE family’s member for one value occupying columns of its own.
impl DefaultMarker for Timebase
mediatime only.The interpretation a Timebase field is read under: the framework’s COMPOSITE reading, which
is the VALUE family’s member for one value occupying columns of its own.
This crate used to MINT the marker here — a local TimebaseMarker<T> with its own
Marker row — because the framework’s family words each named one of ITS
filter kinds and a timebase’s filter is none of them. CompositeMarker is the family that was
missing, and the row above is the answer the mint existed to supply, so the reading is the
framework’s now and the FILTER stays this crate’s.
Its Marker::UnderOption is NullableMarker and not the collection reading, which is the
property the mint had to state by hand: a timebase occupies two columns OF ITS OWN, so both can
be NULL together and the null state is a real observable.
type Marker = CompositeMarker<Timebase>
Source§impl DefaultMarker for ingraph::Timestamp
impl DefaultMarker for ingraph::Timestamp
type Marker = ScalarMarker<Timestamp>
type Marker = StringMarker<Utf8Bytes<Shared>>
Source§impl DefaultMarker for VideoCodec
Available on crate feature mediaframe only.The interpretation a VideoCodec field is read under: the framework’s COMPOSITE reading, which is the VALUE family’s member for one value occupying a column of its own.
impl DefaultMarker for VideoCodec
mediaframe only.The interpretation a VideoCodec field is read under: the framework’s COMPOSITE reading, which is the VALUE family’s member for one value occupying a column of its own.
Its Marker::UnderOption is
NullableMarker and not the collection reading: a codec occupies a
column OF ITS OWN, so it can be NULL and the null state is a real observable — a track
whose codec the demuxer could not name is not a track encoded with a codec called nothing.
type Marker = CompositeMarker<VideoCodec>
Source§impl<S: ConfidenceCarrier> DefaultMarker for Confidence<S>
impl<S: ConfidenceCarrier> DefaultMarker for Confidence<S>
type Marker = ScalarMarker<Confidence<S>>
Source§impl<T: DefaultMarker> DefaultMarker for BarcodeDetection<T>
The interpretation a BarcodeDetection<T> field is read under — the COMPOSITE reading.
impl<T: DefaultMarker> DefaultMarker for BarcodeDetection<T>
The interpretation a BarcodeDetection<T> field is read under — the COMPOSITE reading.
type Marker = CompositeMarker<BarcodeDetection<T>>
Source§impl<T: DefaultMarker> DefaultMarker for BoundingBox<T>
The interpretation a BoundingBox<T> field is read under — the COMPOSITE reading, because the
value occupies columns of its own and all four can be absent together.
impl<T: DefaultMarker> DefaultMarker for BoundingBox<T>
The interpretation a BoundingBox<T> field is read under — the COMPOSITE reading, because the
value occupies columns of its own and all four can be absent together.
The bound is the COMPONENT’s own default, which is the membership rule spelled as a bound exactly
as TimeRanged<T>’s row spells its payload’s: a box has a default
interpretation wherever its component has one. A component with none reaches E0277 naming
ITSELF, which is the sentence a declaration’s author can act on.
type Marker = CompositeMarker<BoundingBox<T>>
Source§impl<T: DefaultMarker> DefaultMarker for DocumentSegment<T>
The interpretation a DocumentSegment<T> field is read under — the COMPOSITE reading.
impl<T: DefaultMarker> DefaultMarker for DocumentSegment<T>
The interpretation a DocumentSegment<T> field is read under — the COMPOSITE reading.
type Marker = CompositeMarker<DocumentSegment<T>>
Source§impl<T: DefaultMarker> DefaultMarker for LocatedDetection<T>
The interpretation a LocatedDetection<T> field is read under — the COMPOSITE reading, because
the value occupies columns of its own and all six can be absent together.
impl<T: DefaultMarker> DefaultMarker for LocatedDetection<T>
The interpretation a LocatedDetection<T> field is read under — the COMPOSITE reading, because
the value occupies columns of its own and all six can be absent together.
type Marker = CompositeMarker<LocatedDetection<T>>
Source§impl<T: DefaultMarker> DefaultMarker for Point2<T>
The COMPOSITE reading, on BoundingBox’s terms: the value occupies columns
of its own and both can be absent together.
impl<T: DefaultMarker> DefaultMarker for Point2<T>
The COMPOSITE reading, on BoundingBox’s terms: the value occupies columns
of its own and both can be absent together.
type Marker = CompositeMarker<Point2<T>>
Source§impl<T: DefaultMarker> DefaultMarker for Quad<T>
The COMPOSITE reading, on the family’s terms.
impl<T: DefaultMarker> DefaultMarker for Quad<T>
The COMPOSITE reading, on the family’s terms.
type Marker = CompositeMarker<Quad<T>>
Source§impl<T: DefaultMarker> DefaultMarker for TextDetection<T>
The interpretation a TextDetection<T> field is read under — the COMPOSITE reading.
impl<T: DefaultMarker> DefaultMarker for TextDetection<T>
The interpretation a TextDetection<T> field is read under — the COMPOSITE reading.
type Marker = CompositeMarker<TextDetection<T>>
Source§impl<T: DefaultMarker> DefaultMarker for TimeRanged<T>
The interpretation a TimeRanged<T> field is read under — the COMPOSITE reading, for
TimeRange’s reason: the value occupies columns of its own, all of which can be absent
together.
impl<T: DefaultMarker> DefaultMarker for TimeRanged<T>
The interpretation a TimeRanged<T> field is read under — the COMPOSITE reading, for
TimeRange’s reason: the value occupies columns of its own, all of which can be absent
together.
The bound is the PAYLOAD’s own default, and it is the membership rule spelled as a bound exactly
as Confidence<S>’s width rows spell theirs: a timed payload has a default
interpretation wherever its payload has one. A payload with none reaches E0277 naming ITSELF,
which is the sentence a declaration’s author can act on — where a row without the bound would
have named this wrapper and left them to work out which half was missing.