cgp-field 0.7.0

Context-generic programming field traits
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use core::marker::PhantomData;

use crate::traits::MapType;

pub trait UpdateField<Tag, M: MapType> {
    type Value;

    type Mapper: MapType;

    type Output;

    fn update_field(
        self,
        _tag: PhantomData<Tag>,
        value: M::Map<Self::Value>,
    ) -> (<Self::Mapper as MapType>::Map<Self::Value>, Self::Output);
}