Struct TypedInput
pub struct TypedInput<'a, I, T = Schema> { /* private fields */ }Expand description
An Input wrapper that validates resolved argument types against
expected types at resolution time.
TypedInput delegates resolution to an inner Input and then checks
that the resolved expression’s inferred type is a subtype of the
expected argument type from tys.
Implementations§
§impl<'a, I, T> TypedInput<'a, I, T>
impl<'a, I, T> TypedInput<'a, I, T>
pub fn new(
cx: ExprContext<'a, T>,
tys: &'a [Type],
input: I,
) -> TypedInput<'a, I, T>
pub fn new( cx: ExprContext<'a, T>, tys: &'a [Type], input: I, ) -> TypedInput<'a, I, T>
Creates a new TypedInput with the given expression context,
expected argument types, and inner input.
Trait Implementations§
§impl<I, T> Input for TypedInput<'_, I, T>
impl<I, T> Input for TypedInput<'_, I, T>
§fn resolve_arg(
&mut self,
expr_arg: &ExprArg,
projection: &Projection,
) -> Option<Expr>
fn resolve_arg( &mut self, expr_arg: &ExprArg, projection: &Projection, ) -> Option<Expr>
Resolves an argument expression at the given projection. Read more
§fn resolve_ref(
&mut self,
expr_reference: &ExprReference,
projection: &Projection,
) -> Option<Expr>
fn resolve_ref( &mut self, expr_reference: &ExprReference, projection: &Projection, ) -> Option<Expr>
Resolves a reference expression at the given projection. Read more
Auto Trait Implementations§
impl<'a, I, T> Freeze for TypedInput<'a, I, T>where
I: Freeze,
impl<'a, I, T> RefUnwindSafe for TypedInput<'a, I, T>where
I: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, I, T> Send for TypedInput<'a, I, T>
impl<'a, I, T> Sync for TypedInput<'a, I, T>
impl<'a, I, T> Unpin for TypedInput<'a, I, T>where
I: Unpin,
impl<'a, I, T> UnwindSafe for TypedInput<'a, I, T>where
I: UnwindSafe,
T: 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