frunk_core::traits

Trait ToMut

Source
pub trait ToMut<'a> {
    type Output;

    // Required method
    fn to_mut(&'a mut self) -> Self::Output;
}
Expand description

An alternative to AsMut that does not force the reference type to be a pointer itself.

This parallels ToRef; see it for more information.

Required Associated Types§

Required Methods§

Source

fn to_mut(&'a mut self) -> Self::Output

Implementors§

Source§

impl<'a> ToMut<'a> for CNil

Source§

impl<'a> ToMut<'a> for HNil

Source§

impl<'a, CH: 'a, CTail> ToMut<'a> for Coproduct<CH, CTail>
where CTail: ToMut<'a>,

Source§

impl<'a, H, Tail> ToMut<'a> for HCons<H, Tail>
where H: 'a, Tail: ToMut<'a>,

Source§

type Output = HCons<&'a mut H, <Tail as ToMut<'a>>::Output>