pub trait ToGraphqlOutput<M: ?Sized = Self> {
type Output<'a>
where M: 'a;
// Required method
fn to_graphql_output(marked: &M) -> Self::Output<'_>;
}Expand description
What a wire face RETURNS a value as — keyed on the value’s own type, or on the MARKER that states a reading the type cannot state for itself.
Total over the types it registers, with the rows spelled out and no blanket. That is forced rather
than chosen — one trait cannot carry a u128 row naming a carrier beside an identity row over
everything else without specialization, which is not on stable — and it is the posture
DefaultMarker already takes on the other side of the wire.
§The seat is BARE, and the backend asks where it SPENDS the form
type Output<'a> carries no bound naming a GraphQL library, and that is a law rather than an
omission: this map says which FORM a value crosses as, which is one fact every binding shares. A
bound here would make the whole map — and every row a declaring crate writes into it — the
property of one library, so a second binding could not read it without the first being compiled.
What each backend needs of the form, it demands at ITS OWN consumption point inside ITS OWN gate:
the emitted wire face returns <T as ToGraphqlOutput>::Output<'_> from a resolver, and
async-graphql’s #[Object] requires that type to be an OutputType structurally — E0277 at the
emitted face, naming the member. The bound moved to where it is spent; nothing about which rows
are legal changed.
The cost, stated: a row naming a form nothing can render is now well formed, and fails at the
first face that returns it rather than at the row. That is the trade the law makes, and it is the
same one ToGraphqlFilter has always made — its Filter seat is bare
too, and a filter that no binding can read fails where a schema asks for it.
§The M parameter is what lets ONE trait serve two kinds of implementer
It DEFAULTS to Self, so a TYPE’s row is written impl ToGraphqlOutput for TheirType and the
trait reads as the map it is — every call site spells <T as ToGraphqlOutput>::Output<'_> and
never mentions the parameter. A MARKER’s row names the type it marks —
impl ToGraphqlOutput<Vec<u8>> for BytesMarker<Vec<u8>> — and that is the whole reason there is
no second trait here: the one question a type cannot answer about itself is delegated to the
interpretation layer that already answers it on the input side, through
DefaultVecMarker’s own rows, instead of to a parallel element-keyed
trait a declaring crate would have had to implement twice.
A parameter rather than an associated type, and that was measured: an associated Marked puts a
PROJECTION in the GAT’s where clause, and rustc will not accept an impl whose clause names
one — E0276, at every row — because it compares the written clause rather than its normal form.
The parameter is the same fact in a position the solver reads.
§The lifetime is what keeps an identity row free
Output<'_> rather than a plain associated type, because the two kinds of row want different
things: a type that already has a wire face is returned BY REFERENCE — &'a Self, which
async-graphql renders through its own blanket over &T — and a type that crosses through a
carrier has to build one. A lifetime-free associated type would have made every identity row a
clone, on every field of every row of every response.
§Examples
A downstream type joins by writing one row. This is ingraph’s trait, so the impl names a local
type and the orphan rule is satisfied without the framework knowing the type exists — and a
Vec of it needs nothing more, the element’s DefaultVecMarker row being what the Vec fork
reads.
use ingraph::ToGraphqlOutput;
/// A declarer's own type, with a wire face of its own.
#[derive(Clone)]
struct Tag(String);
#[ingraph::__private::async_graphql::Scalar(
crate = "ingraph::__private::async_graphql",
name = "Tag"
)]
impl ingraph::__private::async_graphql::ScalarType for Tag {
fn parse(
value: ingraph::__private::async_graphql::Value,
) -> ingraph::__private::async_graphql::InputValueResult<Self> {
match value {
ingraph::__private::async_graphql::Value::String(text) => Ok(Self(text)),
other => Err(ingraph::__private::async_graphql::InputValueError::expected_type(other)),
}
}
fn to_value(&self) -> ingraph::__private::async_graphql::Value {
ingraph::__private::async_graphql::Value::String(self.0.clone())
}
}
impl ToGraphqlOutput for Tag {
type Output<'a> = &'a Self;
fn to_graphql_output(tag: &Self) -> &Self {
tag
}
}Required Associated Types§
Required Methods§
Sourcefn to_graphql_output(marked: &M) -> Self::Output<'_>
fn to_graphql_output(marked: &M) -> Self::Output<'_>
That value, in that form.
An associated function rather than a method, because half the implementers are MARKERS and a
marker has no value to be a receiver of. The call spelling is unchanged either way:
<T as ToGraphqlOutput>::to_graphql_output(value).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl ToGraphqlOutput for &'static str
THE STATIC TEXT ROW, and it is an OUTPUT one with no INPUT twin — the second half of door
(b), and the one place in this map where the mirror is deliberately one-sided.
impl ToGraphqlOutput for &'static str
THE STATIC TEXT ROW, and it is an OUTPUT one with no INPUT twin — the second half of door (b), and the one place in this map where the mirror is deliberately one-sided.
A &'static str is what a declaration holds when the value is the PROGRAM’s rather than the
row’s: a fixed kind word, a build constant, a name minted at compile time. It returns as ordinary
text — String’s row borrows in exactly this way, and async-graphql faces str — so publishing
one costs no allocation and no clone.
§There is no ToGraphqlInput row, and there cannot be
That trait’s cross reads a wire value into the domain type, and the wire value is a String
built at parse time. Nothing turns one into a &'static str: the borrow outlives every buffer
the operand could have arrived in, and the only constructions that would type-check are a leak
(unbounded memory, driven by a client) or an interning table this crate would have to own. So the
absence is STRUCTURAL rather than a row nobody has written yet, and it is left absent rather than
faked.
What that costs is stated where it bites: a declared field of this type publishes and cannot
be FILTERED, because a filter’s operand is written by a client and crosses inward. See
roster, where the door is recorded with the rest of what the roster does not
hold.
Source§impl ToGraphqlOutput for Bytes
impl ToGraphqlOutput for Bytes
Source§impl ToGraphqlOutput for Date
impl ToGraphqlOutput for Date
Source§impl ToGraphqlOutput for DateTime
impl ToGraphqlOutput for DateTime
type Output<'a> = JiffCivilDateTime
fn to_graphql_output(marked: &Self) -> JiffCivilDateTime
Source§impl ToGraphqlOutput for IpAddr
impl ToGraphqlOutput for IpAddr
Source§impl ToGraphqlOutput for Ipv4Addr
impl ToGraphqlOutput for Ipv4Addr
type Output<'a> = NetIpv4Addr
fn to_graphql_output(marked: &Self) -> NetIpv4Addr
Source§impl ToGraphqlOutput for Ipv6Addr
impl ToGraphqlOutput for Ipv6Addr
type Output<'a> = NetIpv6Addr
fn to_graphql_output(marked: &Self) -> NetIpv6Addr
Source§impl ToGraphqlOutput for NonZeroI8
impl ToGraphqlOutput for NonZeroI8
Source§impl ToGraphqlOutput for NonZeroI16
impl ToGraphqlOutput for NonZeroI16
Source§impl ToGraphqlOutput for NonZeroI32
impl ToGraphqlOutput for NonZeroI32
Source§impl ToGraphqlOutput for NonZeroI64
impl ToGraphqlOutput for NonZeroI64
Source§impl ToGraphqlOutput for NonZeroI128
impl ToGraphqlOutput for NonZeroI128
Source§impl ToGraphqlOutput for NonZeroU8
impl ToGraphqlOutput for NonZeroU8
Source§impl ToGraphqlOutput for NonZeroU16
impl ToGraphqlOutput for NonZeroU16
Source§impl ToGraphqlOutput for NonZeroU32
impl ToGraphqlOutput for NonZeroU32
Source§impl ToGraphqlOutput for NonZeroU64
impl ToGraphqlOutput for NonZeroU64
Source§impl ToGraphqlOutput for NonZeroU128
impl ToGraphqlOutput for NonZeroU128
Source§impl ToGraphqlOutput for Offset
impl ToGraphqlOutput for Offset
type Output<'a> = JiffZoneOffset
fn to_graphql_output(marked: &Self) -> JiffZoneOffset
Source§impl ToGraphqlOutput for Regex
Available on crate feature regex only.THE PATTERN, returned through the same carrier its operands are read in — the uuid row’s
mirror one type over, so a pattern column’s two directions cannot come to disagree.
impl ToGraphqlOutput for Regex
regex only.THE PATTERN, returned through the same carrier its operands are read in — the uuid row’s mirror one type over, so a pattern column’s two directions cannot come to disagree.
Written out rather than taken from [crosses_through!], and the reason is the arm’s own
sentence: that arm’s *marked assumes Copy, which every row in it is, and a regex::Regex
is not. So the value is CLONED, and what that costs is worth naming because it is paid per
returned row: regex’s clone bumps the Arc behind the compiled strategy and the Arc<str>
behind the pattern, then boxes one closure and allocates a fresh cache pool at the configured
capacity. NOTHING IS RE-COMPILED — the automaton is shared — so the price is a handful of
allocations and no parse.
Returning &'a str instead would have been free and is refused: it publishes the field as
String! where the same column’s OPERANDS are read as Regex, and a schema whose input and
output disagree about a column’s type is a schema a client cannot round-trip through. The named
scalar on both sides is what the allocation buys.
type Output<'a> = RegexPattern
fn to_graphql_output(marked: &Self) -> RegexPattern
Source§impl ToGraphqlOutput for SignedDuration
impl ToGraphqlOutput for SignedDuration
type Output<'a> = JiffDuration
fn to_graphql_output(marked: &Self) -> JiffDuration
Source§impl ToGraphqlOutput for SmolStr
impl ToGraphqlOutput for SmolStr
Source§impl ToGraphqlOutput for SocketAddr
impl ToGraphqlOutput for SocketAddr
type Output<'a> = NetSocketAddr
fn to_graphql_output(marked: &Self) -> NetSocketAddr
Source§impl ToGraphqlOutput for SocketAddrV4
impl ToGraphqlOutput for SocketAddrV4
type Output<'a> = NetSocketAddrV4
fn to_graphql_output(marked: &Self) -> NetSocketAddrV4
Source§impl ToGraphqlOutput for SocketAddrV6
impl ToGraphqlOutput for SocketAddrV6
type Output<'a> = NetSocketAddrV6
fn to_graphql_output(marked: &Self) -> NetSocketAddrV6
Source§impl ToGraphqlOutput for String
impl ToGraphqlOutput for String
Source§impl ToGraphqlOutput for Time
impl ToGraphqlOutput for Time
Source§impl ToGraphqlOutput for Timestamp
impl ToGraphqlOutput for Timestamp
Source§impl ToGraphqlOutput for Uuid
impl ToGraphqlOutput for Uuid
type Output<'a> = HyphenatedUuid
fn to_graphql_output(marked: &Self) -> HyphenatedUuid
Source§impl ToGraphqlOutput for Zoned
impl ToGraphqlOutput for Zoned
Source§impl ToGraphqlOutput for bool
impl ToGraphqlOutput for bool
Source§impl ToGraphqlOutput for f32
impl ToGraphqlOutput for f32
Source§impl ToGraphqlOutput for f64
impl ToGraphqlOutput for f64
Source§impl ToGraphqlOutput for i8
impl ToGraphqlOutput for i8
Source§impl ToGraphqlOutput for i16
impl ToGraphqlOutput for i16
Source§impl ToGraphqlOutput for i32
impl ToGraphqlOutput for i32
Source§impl ToGraphqlOutput for i64
impl ToGraphqlOutput for i64
Source§impl ToGraphqlOutput for i128
impl ToGraphqlOutput for i128
Source§impl ToGraphqlOutput for u8
impl ToGraphqlOutput for u8
Source§impl ToGraphqlOutput for u16
impl ToGraphqlOutput for u16
Source§impl ToGraphqlOutput for u32
impl ToGraphqlOutput for u32
Source§impl ToGraphqlOutput for u64
impl ToGraphqlOutput for u64
Source§impl ToGraphqlOutput for u128
impl ToGraphqlOutput for u128
Source§impl<T> ToGraphqlOutput for Option<T>where
T: ToGraphqlOutput,
An Option is returned as an Option of what is under it — the nullable column’s leg, and one
row over every T.
impl<T> ToGraphqlOutput for Option<T>where
T: ToGraphqlOutput,
An Option is returned as an Option of what is under it — the nullable column’s leg, and one
row over every T.
Option<T::Output<'_>> rather than &Option<T>, and the difference is not cosmetic: the inner
half is what gets PROJECTED, so a nullable u128 column returns Option<U128> and not an
option of a type no schema has.
Keyed on the TYPE and not on NullableMarker, because Option is not
the ambiguous fork: an optional value is an optional value in every reading, where a Vec is a
blob under one and a list under another.
type Output<'a> = Option<<T as ToGraphqlOutput>::Output<'a>> where Self: 'a
fn to_graphql_output(marked: &Self) -> Self::Output<'_>
Source§impl<T> ToGraphqlOutput for Vec<T>
A Vec is returned as whatever its ELEMENT’s own DefaultVecMarker
row says a Vec of it is READ as — the input side’s fork, spent once more.
impl<T> ToGraphqlOutput for Vec<T>
A Vec is returned as whatever its ELEMENT’s own DefaultVecMarker
row says a Vec of it is READ as — the input side’s fork, spent once more.
This is the row the second trait existed for, and reading it here is what retired that trait: the blob-versus-list question is one fact about an element, the input side already keys it on the element, and a second element-keyed trait beside it was the same fact written twice.
The marker’s row is what carries the answer, and ToGraphqlOutput<Self> in the bound is what
holds it to answering about the right thing — a marker stating a reading of something else fails
HERE, where the delegation is written, rather than at the field that spent it.
type Output<'a> = <<T as DefaultVecMarker>::Marker as ToGraphqlOutput<Vec<T>>>::Output<'a> where Self: 'a
fn to_graphql_output(marked: &Self) -> Self::Output<'_>
Source§impl<const N: usize> ToGraphqlOutput for [u8; N]
The FIXED-WIDTH row, one impl over every width — the return half of
BytesWire<[u8; N]>.
impl<const N: usize> ToGraphqlOutput for [u8; N]
The FIXED-WIDTH row, one impl over every width — the return half of
BytesWire<[u8; N]>.
Hex, as the blob is, and for the reason the crossing gives: a digest is written that way everywhere else it appears, so a client reading a hash and a thumbnail is reading one form.
The WIDTH is in the returned scalar’s name, because the two directions have to agree about one
column: a field publishing bytes beside a filter over Fixed16U8Array would be the input and
the output disagreeing about what the column holds. FixedU8Array<N> assembles Fixed{N}U8Array
on both faces, so storedDigest: Fixed16U8Array! reads beside Fixed16U8ArrayFilter.
type Output<'a> = FixedU8Array<N>
fn to_graphql_output(marked: &Self) -> FixedU8Array<N>
Implementors§
Source§impl ToGraphqlOutput for AudioCodec
Available on crate feature mediaframe only.The crossing OUT, and it is the identity the crossing IN is: what a wire face returns is
a BORROW of the value the row already holds.
impl ToGraphqlOutput for AudioCodec
mediaframe only.The crossing OUT, and it is the identity the crossing IN is: what a wire face returns is a BORROW of the value the row already holds.
The pair is what makes a codec column a whole field type rather than half of one — a filter
face with no return is what ToGraphqlOutput’s own note calls
half a field type. The seat is BARE — no OutputType bound is written here — so the row
stands in a build with no GraphQL binding at all.
type Output<'a> = &'a AudioCodec
Source§impl ToGraphqlOutput for BlobLocation
The OUTPUT CROSSING: a location is returned BY REFERENCE, the identity row every type that
already has a wire face takes.
impl ToGraphqlOutput for BlobLocation
The OUTPUT CROSSING: a location is returned BY REFERENCE, the identity row every type that already has a wire face takes.
The row lives beside the type rather than in
graphql::output’s own table because it is what a BACKEND’s location
row will look like — the trait is ingraph’s and the type is the implementer’s, so the impl is
ordinary local work with no orphan rule anywhere near it. That this crate’s own citizen writes
exactly the row a third party writes is the point.
type Output<'a> = &'a BlobLocation
Source§impl ToGraphqlOutput for Count
THE CARDINALITY RETURNS ON u64’s OWN SCALAR, which is the whole of what its wire face is.
impl ToGraphqlOutput for Count
THE CARDINALITY RETURNS ON u64’s OWN SCALAR, which is the whole of what its wire face is.
A Count is a u64 that knows where it came from, and where it came from is a fact about
STORAGE — see the type’s own note, where the invariant buys it a column on the two dialects with
no unsigned 64-bit type. The wire has no such shortage. u64’s roster scalar is already
HYBRID — a JSON number below 2^53 − 1 and decimal text at or above it — so a count of any
magnitude crosses exactly, and a scalar of its own would publish a second SDL name for one
form, telling a client nothing it could act on.
So the SDL a counting measure publishes is u64!, unchanged by the type that now fills it. The
arm is written out rather than taken from crosses_through! because that arm spends
Carrier::from(*marked) and U64 converts from the bare width: the hop through
Count::get is the one line that differs, and it costs a register move.
Source§impl ToGraphqlOutput for DetectedLanguage
Available on crate feature derive only.The crossing OUT — a BORROW, resolved by the #[Object] this type publishes: the four seats
of its identity FLATTENED, and the confidence beside them.
impl ToGraphqlOutput for DetectedLanguage
derive only.The crossing OUT — a BORROW, resolved by the #[Object] this type publishes: the four seats
of its identity FLATTENED, and the confidence beside them.
There is no ToGraphqlInput row beside it, and the absence is the
filter’s shape rather than an omission. A client never SENDS a whole detection: what it sends is a
DetectedLanguageFilter, whose operands are a LanguageIdOperand,
the three subtags and a confidence threshold. A whole-detection eq would be an exact float
equality against a number a client typed, which is the question this type’s
DefaultVecMarker row already argues cannot be asked honestly.
So the two directions are deliberately unequal here, where they are equal for every other type in this house — and the row that would have made them equal is the one that would have published a question with no true answer.
type Output<'a> = &'a DetectedLanguage
Source§impl ToGraphqlOutput for Detection
Available on crate feature async-graphql only.The crossing OUT — a BORROW, resolved by the #[Object] above.
impl ToGraphqlOutput for Detection
async-graphql only.The crossing OUT — a BORROW, resolved by the #[Object] above.
Source§impl ToGraphqlOutput for Label
Available on crate feature async-graphql only.AND OUT, mirroring the row above so the two directions cannot come to disagree.
impl ToGraphqlOutput for Label
async-graphql only.AND OUT, mirroring the row above so the two directions cannot come to disagree.
A BORROW of the text rather than of the value, which is Utf8Bytes’ own bargain at this seat:
the label has no scalar to be returned as, so what a field yields is the string it holds.
Source§impl ToGraphqlOutput for Language
Available on crate feature derive only.The crossing OUT, and it is the identity the crossing IN is: this type IS its own GraphQL
scalar, so what a wire face returns is a BORROW of the value the row already holds.
impl ToGraphqlOutput for Language
derive only.The crossing OUT, and it is the identity the crossing IN is: this type IS its own GraphQL scalar, so what a wire face returns is a BORROW of the value the row already holds.
The row above says what a client may SEND and this one what a client is GIVEN, and the pair
is what makes a subtag column a whole field type rather than half of one — a filter face with
no return is what ToGraphqlOutput’s own note calls half a field
type. An emitted record’s face returns
<
Language
as ToGraphqlOutput>::Output<'_>, so a declaration storing one could publish NOTHING
without this row: E0277 at the emitted face, naming the member.
&'a Self and never a clone, which is String’s own row’s bargain: the scalar door’s
to_value is what builds the JSON, and it takes a borrow.
The seat is BARE — no OutputType bound is written here — so the row stands in a build with
no GraphQL binding at all, and the library that renders it demands what it needs where it
spends the form. That is the map’s own law rather than a choice made in this house.
Source§impl ToGraphqlOutput for LanguageId
Available on crate feature derive only.The crossing OUT, and it is NOT the operand’s type — which is the whole asymmetry the two
namespaces force.
impl ToGraphqlOutput for LanguageId
derive only.The crossing OUT, and it is NOT the operand’s type — which is the whole asymmetry the two namespaces force.
A client SENDS a LanguageIdOperand, which is a scalar holding the canonical tag, and RECEIVES a
LanguageId, which is the #[Object] published next door: five fields, the four seats plus the
rendering that spells them. So this row hands back a BORROW of the value the row holds and lets
that object resolve it, where ToGraphqlInput above has to wrap.
The pair is what makes the identity a round trip rather than half of one: the object’s tag field
is the operand’s own text, so a client reads a tag out of one and writes it back into the other.
Without this row a declaration storing a LanguageId could publish NOTHING — an emitted face
returns <LanguageId as ToGraphqlOutput>::Output<'_>, so the absence is E0277 at the face and
not at the column.
type Output<'a> = &'a LanguageId
Source§impl ToGraphqlOutput for LocalTimestamp
Available on crate features async-graphql and derive and time only.The OUTPUT row: a capture time is returned as itself, by reference, through the object below.
impl ToGraphqlOutput for LocalTimestamp
async-graphql and derive and time only.The OUTPUT row: a capture time is returned as itself, by reference, through the object below.
type Output<'a> = &'a LocalTimestamp
Source§impl ToGraphqlOutput for MediaTimeRange
Available on crate features async-graphql and mediatime only.The OUTPUT row: a range is returned as itself, by reference, through the object below.
impl ToGraphqlOutput for MediaTimeRange
async-graphql and mediatime only.The OUTPUT row: a range is returned as itself, by reference, through the object below.
type Output<'a> = &'a MediaTimeRange
Source§impl ToGraphqlOutput for MediaTimestamp
Available on crate features async-graphql and mediatime only.The OUTPUT row: a timestamp is returned as itself, by reference, through the object below.
impl ToGraphqlOutput for MediaTimestamp
async-graphql and mediatime only.The OUTPUT row: a timestamp is returned as itself, by reference, through the object below.
type Output<'a> = &'a MediaTimestamp
Source§impl ToGraphqlOutput for NormCoord
Available on crate feature async-graphql only.AND OUT, mirroring the row above so the two directions cannot come to disagree.
impl ToGraphqlOutput for NormCoord
async-graphql only.AND OUT, mirroring the row above so the two directions cannot come to disagree.
BY VALUE rather than by reference, which is the carrier shape and costs a register move: a
coordinate is Copy.
Source§impl ToGraphqlOutput for Rate
Available on crate features async-graphql and mediatime only.The OUTPUT row: a rate is returned as ITSELF, by reference, through the object below.
impl ToGraphqlOutput for Rate
async-graphql and mediatime only.The OUTPUT row: a rate is returned as ITSELF, by reference, through the object below.
Source§impl ToGraphqlOutput for Region
Available on crate feature derive only.The crossing OUT, and it is the identity the crossing IN is: this type IS its own GraphQL
scalar, so what a wire face returns is a BORROW of the value the row already holds.
impl ToGraphqlOutput for Region
derive only.The crossing OUT, and it is the identity the crossing IN is: this type IS its own GraphQL scalar, so what a wire face returns is a BORROW of the value the row already holds.
The row above says what a client may SEND and this one what a client is GIVEN, and the pair
is what makes a subtag column a whole field type rather than half of one — a filter face with
no return is what ToGraphqlOutput’s own note calls half a field
type. An emitted record’s face returns
<
Region
as ToGraphqlOutput>::Output<'_>, so a declaration storing one could publish NOTHING
without this row: E0277 at the emitted face, naming the member.
&'a Self and never a clone, which is String’s own row’s bargain: the scalar door’s
to_value is what builds the JSON, and it takes a borrow.
The seat is BARE — no OutputType bound is written here — so the row stands in a build with
no GraphQL binding at all, and the library that renders it demands what it needs where it
spends the form. That is the map’s own law rather than a choice made in this house.
Source§impl ToGraphqlOutput for ScriptSubtag
Available on crate feature derive only.The crossing OUT, and it is the identity the crossing IN is: this type IS its own GraphQL
scalar, so what a wire face returns is a BORROW of the value the row already holds.
impl ToGraphqlOutput for ScriptSubtag
derive only.The crossing OUT, and it is the identity the crossing IN is: this type IS its own GraphQL scalar, so what a wire face returns is a BORROW of the value the row already holds.
The row above says what a client may SEND and this one what a client is GIVEN, and the pair
is what makes a subtag column a whole field type rather than half of one — a filter face with
no return is what ToGraphqlOutput’s own note calls half a field
type. An emitted record’s face returns
<
ScriptSubtag
as ToGraphqlOutput>::Output<'_>, so a declaration storing one could publish NOTHING
without this row: E0277 at the emitted face, naming the member.
&'a Self and never a clone, which is String’s own row’s bargain: the scalar door’s
to_value is what builds the JSON, and it takes a borrow.
The seat is BARE — no OutputType bound is written here — so the row stands in a build with
no GraphQL binding at all, and the library that renders it demands what it needs where it
spends the form. That is the map’s own law rather than a choice made in this house.
type Output<'a> = &'a ScriptSubtag
Source§impl ToGraphqlOutput for SubtitleCodec
Available on crate feature mediaframe only.The crossing OUT, and it is the identity the crossing IN is: what a wire face returns is
a BORROW of the value the row already holds.
impl ToGraphqlOutput for SubtitleCodec
mediaframe only.The crossing OUT, and it is the identity the crossing IN is: what a wire face returns is a BORROW of the value the row already holds.
The pair is what makes a codec column a whole field type rather than half of one — a filter
face with no return is what ToGraphqlOutput’s own note calls
half a field type. The seat is BARE — no OutputType bound is written here — so the row
stands in a build with no GraphQL binding at all.
type Output<'a> = &'a SubtitleCodec
Source§impl ToGraphqlOutput for TimeRange
The crossing OUT — a BORROW, resolved by the #[Object] this type publishes: the two instants
under their own names.
impl ToGraphqlOutput for TimeRange
The crossing OUT — a BORROW, resolved by the #[Object] this type publishes: the two instants
under their own names.
Unlike DetectedLanguage there IS an input row beside it — see
TimeRangeOperand — because a client genuinely SENDS a whole range: all three interval words
take one, and every instant in it is a value a client can spell exactly. The asymmetry that type
records is about a FLOAT operand, and there is none here.
Source§impl ToGraphqlOutput for Timebase
Available on crate features async-graphql and mediatime only.The OPERAND’s own crossing — the row a COLLECTION face reads to learn what one element of a
[Timebase] looks like on the wire.
impl ToGraphqlOutput for Timebase
async-graphql and mediatime only.The OPERAND’s own crossing — the row a COLLECTION face reads to learn what one element of a
[Timebase] looks like on the wire.
The OUTPUT row: a timebase is returned as ITSELF, by reference, through the object below.
The identity arm rather than a carrier, which is what the lifetime on Output exists to make
free: a type that already has a wire face is rendered through async-graphql’s own blanket over
&T, and a clone per field of every response is exactly what a lifetime-free seat would have
cost.
Source§impl ToGraphqlOutput for VideoCodec
Available on crate feature mediaframe only.The crossing OUT, and it is the identity the crossing IN is: what a wire face returns is
a BORROW of the value the row already holds.
impl ToGraphqlOutput for VideoCodec
mediaframe only.The crossing OUT, and it is the identity the crossing IN is: what a wire face returns is a BORROW of the value the row already holds.
The pair is what makes a codec column a whole field type rather than half of one — a filter
face with no return is what ToGraphqlOutput’s own note calls
half a field type. The seat is BARE — no OutputType bound is written here — so the row
stands in a build with no GraphQL binding at all.
type Output<'a> = &'a VideoCodec
Source§impl ToGraphqlOutput<Vec<u8>> for BytesMarker<Vec<u8>>
The one element whose Vec is not a list. A Vec<u8> is a BLOB, and it crosses as lowercase
hex through the same carrier its filter’s operands cross through — two characters per byte, which
is how a checksum, a magic number and a content id are written everywhere else they appear.
impl ToGraphqlOutput<Vec<u8>> for BytesMarker<Vec<u8>>
The one element whose Vec is not a list. A Vec<u8> is a BLOB, and it crosses as lowercase
hex through the same carrier its filter’s operands cross through — two characters per byte, which
is how a checksum, a magic number and a content id are written everywhere else they appear.
Rendering it as [Int!] is what async-graphql’s own blanket would do, and it is the face this
module exists to keep out of a schema: a client would receive a thumbnail as a list of small
integers, and would have filtered it as hex one field earlier.
Written on the MARKER rather than on the element, and that is the exception carrying its own
reason: u8’s DefaultVecMarker row already names
BytesMarker<Vec<u8>> as what a Vec of bytes is read under, so the blob’s
output form is stated at the interpretation that decided it is a blob.
The copy is the honest cost of a total crossing: HexBytes owns its bytes, and returning a
blob must not consume the row it came from — the same trade the input side’s write makes.
Source§impl<E, VM> ToGraphqlOutput<Vec<E>> for ListMarker<Vec<E>, VM>where
E: ToGraphqlOutput,
impl<E, VM> ToGraphqlOutput<Vec<E>> for ListMarker<Vec<E>, VM>where
E: ToGraphqlOutput,
Source§impl<E, VM> ToGraphqlOutput<Vec<E>> for QuantifiedMarker<Vec<E>, VM>where
E: ToGraphqlOutput,
impl<E, VM> ToGraphqlOutput<Vec<E>> for QuantifiedMarker<Vec<E>, VM>where
E: ToGraphqlOutput,
Source§impl<E, VM> ToGraphqlOutput<Vec<E>> for SetMarker<Vec<E>, VM>where
E: ToGraphqlOutput,
impl<E, VM> ToGraphqlOutput<Vec<E>> for SetMarker<Vec<E>, VM>where
E: ToGraphqlOutput,
Source§impl<S: ConfidenceWire> ToGraphqlOutput for Confidence<S>
impl<S: ConfidenceWire> ToGraphqlOutput for Confidence<S>
type Output<'a> = <S as ConfidenceWire>::Carrier where S: 'a
Source§impl<T> ToGraphqlOutput for BarcodeDetection<T>
Available on crate feature async-graphql only.The crossing OUT — a BORROW, resolved by the #[Object] above.
impl<T> ToGraphqlOutput for BarcodeDetection<T>
async-graphql only.The crossing OUT — a BORROW, resolved by the #[Object] above.
type Output<'a> = &'a BarcodeDetection<T> where T: 'a
Source§impl<T> ToGraphqlOutput for BoundingBox<T>
Available on crate feature async-graphql only.The crossing OUT — a BORROW, resolved by the #[Object] above.
impl<T> ToGraphqlOutput for BoundingBox<T>
async-graphql only.The crossing OUT — a BORROW, resolved by the #[Object] above.
type Output<'a> = &'a BoundingBox<T> where T: 'a
Source§impl<T> ToGraphqlOutput for DocumentSegment<T>
Available on crate feature async-graphql only.The crossing OUT — a BORROW, resolved by the #[Object] above.
impl<T> ToGraphqlOutput for DocumentSegment<T>
async-graphql only.The crossing OUT — a BORROW, resolved by the #[Object] above.
type Output<'a> = &'a DocumentSegment<T> where T: 'a
Source§impl<T> ToGraphqlOutput for LocatedDetection<T>
Available on crate feature async-graphql only.The crossing OUT — a BORROW, resolved by the #[Object] above.
impl<T> ToGraphqlOutput for LocatedDetection<T>
async-graphql only.The crossing OUT — a BORROW, resolved by the #[Object] above.
type Output<'a> = &'a LocatedDetection<T> where T: 'a
Source§impl<T> ToGraphqlOutput for Point2<T>
Available on crate feature async-graphql only.The crossing OUT — a BORROW, resolved by the #[Object] above.
impl<T> ToGraphqlOutput for Point2<T>
async-graphql only.The crossing OUT — a BORROW, resolved by the #[Object] above.
Source§impl<T> ToGraphqlOutput for Quad<T>
Available on crate feature async-graphql only.The crossing OUT — a BORROW, resolved by the #[Object] above.
impl<T> ToGraphqlOutput for Quad<T>
async-graphql only.The crossing OUT — a BORROW, resolved by the #[Object] above.
Source§impl<T> ToGraphqlOutput for Radians<T>where
Builtin: ScalarWire<T>,
Available on crate feature async-graphql only.AND OUT, mirroring the row above so the two directions cannot come to disagree — the mirror
law radians::tests pins by round-tripping through both. BY VALUE rather than by
reference, the carrier shape every Copy citizen here takes.
impl<T> ToGraphqlOutput for Radians<T>where
Builtin: ScalarWire<T>,
async-graphql only.AND OUT, mirroring the row above so the two directions cannot come to disagree — the mirror
law radians::tests pins by round-tripping through both. BY VALUE rather than by
reference, the carrier shape every Copy citizen here takes.
Source§impl<T> ToGraphqlOutput for TextDetection<T>
Available on crate feature async-graphql only.The crossing OUT — a BORROW, resolved by the #[Object] above.
impl<T> ToGraphqlOutput for TextDetection<T>
async-graphql only.The crossing OUT — a BORROW, resolved by the #[Object] above.
type Output<'a> = &'a TextDetection<T> where T: 'a
Source§impl<T> ToGraphqlOutput for TimeRanged<T>
Available on crate feature async-graphql only.The crossing OUT — a BORROW, resolved by the #[Object] above.
impl<T> ToGraphqlOutput for TimeRanged<T>
async-graphql only.The crossing OUT — a BORROW, resolved by the #[Object] above.
There is no ToGraphqlInput row beside it, and the absence is the
filter’s shape rather than an omission — the same asymmetry
DetectedLanguage records, arriving here for a different reason. A
client never SENDS a whole timed payload: what it sends is a TimeRangedFilter, whose two
slots are a TimeRangeFilter and the payload family’s own filter. A whole-pair eq would need
an input object over the payload — which is a face the payload may not have, and which this crate
cannot mint for a parameter.