1use crate::{Carrier, Fail, Fault, LaneProfile};
19
20pub trait Reshape {
23 type WithDenied;
24 type WithoutDenied;
25 type WithTransient;
26 type WithoutTransient;
27 type WithFatal;
28}
29
30impl<L: LaneProfile> Reshape for Fault<L> {
31 type WithDenied = Fault<L::WithDenied>;
32 type WithoutDenied = Fault<L::WithoutDenied>;
33 type WithTransient = Fault<L::WithTransient>;
34 type WithoutTransient = Fault<L::WithoutTransient>;
35 type WithFatal = Fault<L::WithFatal>;
36}
37
38impl<D, L: LaneProfile> Reshape for Fail<D, L> {
39 type WithDenied = Fail<D, L::WithDenied>;
40 type WithoutDenied = Fail<D, L::WithoutDenied>;
41 type WithTransient = Fail<D, L::WithTransient>;
42 type WithoutTransient = Fail<D, L::WithoutTransient>;
43 type WithFatal = Fail<D, L::WithFatal>;
44}
45
46impl<C: Carrier> Reshape for C
48where
49 C::Repr: Reshape,
50{
51 type WithDenied = <C::Repr as Reshape>::WithDenied;
52 type WithoutDenied = <C::Repr as Reshape>::WithoutDenied;
53 type WithTransient = <C::Repr as Reshape>::WithTransient;
54 type WithoutTransient = <C::Repr as Reshape>::WithoutTransient;
55 type WithFatal = <C::Repr as Reshape>::WithFatal;
56}
57
58pub type WithDenied<E> = <E as Reshape>::WithDenied;
60pub type WithoutDenied<E> = <E as Reshape>::WithoutDenied;
62pub type WithTransient<E> = <E as Reshape>::WithTransient;
64pub type WithoutTransient<E> = <E as Reshape>::WithoutTransient;
66pub type WithFatal<E> = <E as Reshape>::WithFatal;