pub struct Building<'a, M> { /* private fields */ }Expand description
The registry mid-fill: the model, plus the conversions supplied so far.
What a generator builds a conversion against. It sees every crossing it
can compose from — RegistryBuilder::crossings hands them out inner-first, so by
the time Option<Handle> is asked for, Handle is already in here.
It exposes exactly the reads a conversion needs, which is what keeps the
half-filled state from leaking anywhere else: the resolved Registry is
what the emitters get, and it is total.
Trait Implementations§
Source§impl<M> Conversions<M> for Building<'_, M>
impl<M> Conversions<M> for Building<'_, M>
Source§fn reading(&self, key: &TypeKey) -> Option<TypeRef>
fn reading(&self, key: &TypeKey) -> Option<TypeRef>
The reading for
ty — what the frontend made of it. Read moreSource§fn callback_arg_plan(&self, key: &TypeKey) -> Option<&UnfoldPlan>
fn callback_arg_plan(&self, key: &TypeKey) -> Option<&UnfoldPlan>
The decomposition of a callback argument type, if it has one. Read more
Source§fn callback_arg_plans(&self) -> &HashMap<TypeKey, UnfoldPlan>
fn callback_arg_plans(&self) -> &HashMap<TypeKey, UnfoldPlan>
Every callback-argument decomposition, for the emitters that enumerate
them rather than look one up.
Source§fn unfold_plans(&self) -> &HashMap<Ident, UnfoldPlan>
fn unfold_plans(&self) -> &HashMap<Ident, UnfoldPlan>
The return decomposition of a function, if it has one.
Source§fn error_plans(&self) -> &HashMap<Ident, UnfoldPlan>
fn error_plans(&self) -> &HashMap<Ident, UnfoldPlan>
The error-position decomposition of a fallible function.
Source§fn decon_plans(&self) -> &HashMap<DeconId, DeconSpec>
fn decon_plans(&self) -> &HashMap<DeconId, DeconSpec>
The declaration-default decomposition behind each deconstructor.
Source§fn crossing_keys(&self, dir: Direction) -> Vec<TypeKey>
fn crossing_keys(&self, dir: Direction) -> Vec<TypeKey>
Every type key that crosses in
dir. Read moreSource§fn reading_of(&self, ty: &Type) -> Option<TypeRef>
fn reading_of(&self, ty: &Type) -> Option<TypeRef>
The reading for a spelling — identify, then look up. Read more
Source§fn origin_module(&self, ident: &Ident) -> Option<Path>
fn origin_module(&self, ident: &Ident) -> Option<Path>
The origin crate’s module path for an item, or
None when unknown.Source§fn default_module(&self) -> Option<Path>
fn default_module(&self) -> Option<Path>
The default module for references with no recorded origin.
Auto Trait Implementations§
impl<'a, M> !Send for Building<'a, M>
impl<'a, M> !Sync for Building<'a, M>
impl<'a, M> Freeze for Building<'a, M>
impl<'a, M> RefUnwindSafe for Building<'a, M>where
M: RefUnwindSafe,
impl<'a, M> Unpin for Building<'a, M>
impl<'a, M> UnsafeUnpin for Building<'a, M>
impl<'a, M> UnwindSafe for Building<'a, M>where
M: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more