pub struct Row { /* private fields */ }Expand description
ONE ROW of an emitted package: a Rust member, the wire name it renders under, and the type it holds.
The struct field is Option<ty> in every case — see the module note’s reading of the de-Option
law — so the row carries the INTERIOR and the emission adds the wrapper.
PUBLIC because Packages is: the root grain builds its own rows and mints them through the
same emitter, and a row it could not name is an emitter it could not reach.
Implementations§
Source§impl Row
impl Row
Sourcepub fn new(member: &Ident, ty: TokenStream, noun: &str) -> Self
pub fn new(member: &Ident, ty: TokenStream, noun: &str) -> Self
One row: the Rust member, the type it holds, and the noun its doc sentence uses.
Sourcepub fn rust_side(self) -> Self
pub fn rust_side(self) -> Self
The same row, RUST-SIDE — present on the struct, absent from its wire face.
§One row and not a whole package, which is what the measurement changed
The question tree carried no face at all while coordinates was the reason: an
Embedding<E, N, S> has no async_graphql::InputType
and cannot generically — its element type, width and space are all the declaration’s — so
emitting one was E0277 at the declaration. But the tree’s OTHER rows cross fine: a question
is a String, and a child route is another question package. Refusing the whole tree for one
row’s sake published nothing where the text half was always publishable.
So the grain moves to the ROW. A package whose rows all cross is unchanged; a package holding
this one publishes the rest, and a request that reaches it leaves the row None — which is
what it means over the wire anyway, coordinates being the thing a client does not have.
to_value omits it for the same reason, so the crossing is lossy in exactly one direction and
says so: a package built in Rust with coordinates and rendered to a Value renders its text.
The raw-coordinate wire form that would close the gap needs an element-typed list crossing into
Embedding, which nothing has yet.