pub struct ValidatorBodies { /* private fields */ }Expand description
Resolves a recursion back-edge to its body, for both Type::AliasRef
(→ alias body) and Type::InterfaceRef (→ structural object of a
data-only interface’s properties). Imported declarations are keyed by
nominal identity; local declarations use their source names because the
typed declaration nodes do not retain their mangled identities.
Implementations§
Source§impl ValidatorBodies
impl ValidatorBodies
pub fn collect<'a>( ta: &TypedAst, dependency_types: impl IntoIterator<Item = &'a DependencyType<'a>>, ) -> Self
Sourcepub fn generic_key(&self, ty: &Type) -> Option<Type>
pub fn generic_key(&self, ty: &Type) -> Option<Type>
One helper per generic declaration, with its arguments supplied as predicates.
Sourcepub fn expand_one(&self, ty: &Type) -> Result<Type, TypeTooLarge>
pub fn expand_one(&self, ty: &Type) -> Result<Type, TypeTooLarge>
Expand one level: a Type::AliasRef becomes its alias body, a
Type::InterfaceRef becomes its data-only property shape (both peeled,
with generic args substituted); any other type returns ty.peel() cloned.
Fails when substituting the arguments passes a type limit.
Auto Trait Implementations§
impl !Freeze for ValidatorBodies
impl !RefUnwindSafe for ValidatorBodies
impl !Sync for ValidatorBodies
impl Send for ValidatorBodies
impl Unpin for ValidatorBodies
impl UnsafeUnpin for ValidatorBodies
impl UnwindSafe for ValidatorBodies
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