pub struct Fix<F: HKT>(/* private fields */);Expand description
The fixed point of a functor F.
Fix<F> ties the recursive knot: Fix<F> ≅ F<Fix<F>>.
It is the core type for recursion schemes — catamorphisms fold
a Fix<F> down, anamorphisms build one up.
Uses Rc for indirection, which makes cloning cheap (reference count
bump). This is essential for paramorphism, which needs to both
preserve and consume each subterm.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<F> Freeze for Fix<F>
impl<F> RefUnwindSafe for Fix<F>
impl<F> !Send for Fix<F>
impl<F> !Sync for Fix<F>
impl<F> Unpin for Fix<F>
impl<F> UnsafeUnpin for Fix<F>
impl<F> UnwindSafe for Fix<F>
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