Struct gluon_base::types::ControlVisitation
source · pub struct ControlVisitation<F: ?Sized>(pub F);
Expand description
Wrapper type which allows functions to control how to traverse the members of the type
Tuple Fields§
§0: F
Trait Implementations§
source§impl<F, Id, T> TypeVisitor<Id, T> for ControlVisitation<F>where
F: FnMut(&T) -> Option<T>,
Id: Clone,
T::SpannedId: Clone,
T: TypeExt<Id = Id> + From<(Type<Id, T>, Flags)> + From<Type<Id, T>>,
T::Types: FromIterator<T> + Clone,
T::Generics: FromIterator<Generic<Id>> + Clone,
T::Fields: FromIterator<Field<T::SpannedId, T>> + Clone,
impl<F, Id, T> TypeVisitor<Id, T> for ControlVisitation<F>where F: FnMut(&T) -> Option<T>, Id: Clone, T::SpannedId: Clone, T: TypeExt<Id = Id> + From<(Type<Id, T>, Flags)> + From<Type<Id, T>>, T::Types: FromIterator<T> + Clone, T::Generics: FromIterator<Generic<Id>> + Clone, T::Fields: FromIterator<Field<T::SpannedId, T>> + Clone,
type Context = NullInterner
fn context(&mut self) -> &mut Self::Context
fn visit(&mut self, typ: &T) -> Option<T>where T: TypePtr<Id = Id> + From<Type<Id, T>> + Clone, Id: Clone,
fn make(&mut self, typ: Type<Id, T>) -> T
fn make_types(&mut self, typ: impl IntoIterator<Item = T>) -> T::Types
fn forall(&mut self, params: T::Generics, typ: T) -> T
fn app(&mut self, id: T, args: T::Types) -> T
Auto Trait Implementations§
impl<F: ?Sized> RefUnwindSafe for ControlVisitation<F>where F: RefUnwindSafe,
impl<F: ?Sized> Send for ControlVisitation<F>where F: Send,
impl<F: ?Sized> Sync for ControlVisitation<F>where F: Sync,
impl<F: ?Sized> Unpin for ControlVisitation<F>where F: Unpin,
impl<F: ?Sized> UnwindSafe for ControlVisitation<F>where F: UnwindSafe,
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