pub struct ResolvedInfixExpression<'r, R: InfixExpressionResolver<H>, H: HostTypes> { /* private fields */ }Expand description
Phase 8 (orphan-closure) — content-addressed wrapper for InfixExpression<H>.
Caches the resolver’s lookup at construction. Accessors return
the cached record’s fields when present, falling back to the
Null{Class}<H> absent sentinels when the resolver returned
None. Object accessors always return absent sentinels — use
the resolve_{m} chain methods to descend into sub-records.
Implementations§
Source§impl<'r, R: InfixExpressionResolver<H>, H: HostTypes> ResolvedInfixExpression<'r, R, H>
impl<'r, R: InfixExpressionResolver<H>, H: HostTypes> ResolvedInfixExpression<'r, R, H>
Sourcepub fn new(handle: InfixExpressionHandle<H>, resolver: &'r R) -> Self
pub fn new(handle: InfixExpressionHandle<H>, resolver: &'r R) -> Self
Construct the wrapper, eagerly resolving the handle.
Sourcepub const fn handle(&self) -> InfixExpressionHandle<H>
pub const fn handle(&self) -> InfixExpressionHandle<H>
The handle this wrapper resolves.
Sourcepub const fn record(&self) -> Option<&InfixExpressionRecord<H>>
pub const fn record(&self) -> Option<&InfixExpressionRecord<H>>
The cached record, or None when the resolver returned None.
Source§impl<'r, R: InfixExpressionResolver<H>, H: HostTypes> ResolvedInfixExpression<'r, R, H>
impl<'r, R: InfixExpressionResolver<H>, H: HostTypes> ResolvedInfixExpression<'r, R, H>
Sourcepub fn resolve_left_operand<'r2, R2: TermExpressionResolver<H>>(
&self,
r: &'r2 R2,
) -> Option<ResolvedTermExpression<'r2, R2, H>>
pub fn resolve_left_operand<'r2, R2: TermExpressionResolver<H>>( &self, r: &'r2 R2, ) -> Option<ResolvedTermExpression<'r2, R2, H>>
Promote the left_operand handle on the cached record into a
resolved wrapper, given a resolver for the range class.
Returns None if no record was resolved at construction.
Sourcepub fn resolve_right_operand<'r2, R2: TermExpressionResolver<H>>(
&self,
r: &'r2 R2,
) -> Option<ResolvedTermExpression<'r2, R2, H>>
pub fn resolve_right_operand<'r2, R2: TermExpressionResolver<H>>( &self, r: &'r2 R2, ) -> Option<ResolvedTermExpression<'r2, R2, H>>
Promote the right_operand handle on the cached record into a
resolved wrapper, given a resolver for the range class.
Returns None if no record was resolved at construction.
Trait Implementations§
Source§impl<'r, R: InfixExpressionResolver<H>, H: HostTypes> InfixExpression<H> for ResolvedInfixExpression<'r, R, H>
impl<'r, R: InfixExpressionResolver<H>, H: HostTypes> InfixExpression<H> for ResolvedInfixExpression<'r, R, H>
Source§type TermExpression = NullTermExpression<H>
type TermExpression = NullTermExpression<H>
TermExpression.