pub enum Resolved<'a> {
Field(&'a Field),
Variant(&'a EnumVariant),
}Expand description
The result of resolving a stmt::Projection through the application
schema.
A projection can resolve to either a concrete Field or an
EnumVariant (when the projection stops at a variant discriminant
without descending into the variant’s data fields).
§Examples
ⓘ
use toasty_core::schema::app::Resolved;
match schema.resolve(root_model, &projection) {
Some(Resolved::Field(f)) => println!("field: {}", f.name),
Some(Resolved::Variant(v)) => println!("variant: {}", v.discriminant),
None => println!("could not resolve"),
}Variants§
Field(&'a Field)
The projection resolved to a concrete field.
Variant(&'a EnumVariant)
The projection resolved to an enum variant (discriminant-only access).
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Resolved<'a>
impl<'a> RefUnwindSafe for Resolved<'a>
impl<'a> Send for Resolved<'a>
impl<'a> Sync for Resolved<'a>
impl<'a> Unpin for Resolved<'a>
impl<'a> UnwindSafe for Resolved<'a>
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