@@ -974,7 +974,7 @@ pub trait IpLayerIngressContext<
974
974
I : IpLayerIpExt + IcmpHandlerIpExt ,
975
975
BC : IpLayerBindingsContext < I , Self :: DeviceId > ,
976
976
> :
977
- IpTransportDispatchContext < I , BC , DeviceId = Self :: DeviceId_ >
977
+ IpTransportDispatchContext < I , BC , DeviceId : filter :: InterfaceProperties < BC :: DeviceClass > >
978
978
+ IpDeviceStateContext < I , BC >
979
979
+ IpDeviceSendContext < I , BC >
980
980
+ IcmpErrorHandler < I , BC >
@@ -983,57 +983,43 @@ pub trait IpLayerIngressContext<
983
983
+ FilterHandlerProvider < I , BC >
984
984
+ RawIpSocketHandler < I , BC >
985
985
{
986
- // This is working around the fact that currently, where clauses are only
987
- // elaborated for supertraits, and not, for example, bounds on associated types
988
- // as we have here.
989
- //
990
- // See https://github.com/rust-lang/rust/issues/20671#issuecomment-1905186183
991
- // for more discussion.
992
- type DeviceId_ : filter:: InterfaceProperties < BC :: DeviceClass > + Debug ;
993
986
}
994
987
995
988
impl <
996
989
I : IpLayerIpExt + IcmpHandlerIpExt ,
997
990
BC : IpLayerBindingsContext < I , CC :: DeviceId > ,
998
- CC : IpTransportDispatchContext < I , BC >
999
- + IpDeviceStateContext < I , BC >
991
+ CC : IpTransportDispatchContext <
992
+ I ,
993
+ BC ,
994
+ DeviceId : filter:: InterfaceProperties < BC :: DeviceClass > ,
995
+ > + IpDeviceStateContext < I , BC >
1000
996
+ IpDeviceSendContext < I , BC >
1001
997
+ IcmpErrorHandler < I , BC >
1002
998
+ IpLayerContext < I , BC >
1003
999
+ FragmentHandler < I , BC >
1004
1000
+ FilterHandlerProvider < I , BC >
1005
1001
+ RawIpSocketHandler < I , BC > ,
1006
1002
> IpLayerIngressContext < I , BC > for CC
1007
- where
1008
- Self :: DeviceId : filter:: InterfaceProperties < BC :: DeviceClass > ,
1009
1003
{
1010
- type DeviceId_ = Self :: DeviceId ;
1011
1004
}
1012
1005
1013
1006
/// A marker trait for all the contexts required for IP egress.
1014
1007
pub ( crate ) trait IpLayerEgressContext < I , BC > :
1015
- IpDeviceSendContext < I , BC , DeviceId = Self :: DeviceId_ > + FilterHandlerProvider < I , BC >
1008
+ IpDeviceSendContext < I , BC , DeviceId : filter:: InterfaceProperties < BC :: DeviceClass > >
1009
+ + FilterHandlerProvider < I , BC >
1016
1010
where
1017
1011
I : IpLayerIpExt ,
1018
1012
BC : FilterBindingsContext ,
1019
1013
{
1020
- // This is working around the fact that currently, where clauses are only
1021
- // elaborated for supertraits, and not, for example, bounds on associated types
1022
- // as we have here.
1023
- //
1024
- // See https://github.com/rust-lang/rust/issues/20671#issuecomment-1905186183
1025
- // for more discussion.
1026
- type DeviceId_ : filter:: InterfaceProperties < BC :: DeviceClass > + StrongDeviceIdentifier + Debug ;
1027
1014
}
1028
1015
1029
1016
impl < I , BC , CC > IpLayerEgressContext < I , BC > for CC
1030
1017
where
1031
1018
I : IpLayerIpExt ,
1032
1019
BC : FilterBindingsContext ,
1033
- CC : IpDeviceSendContext < I , BC > + FilterHandlerProvider < I , BC > ,
1034
- Self :: DeviceId : filter :: InterfaceProperties < BC :: DeviceClass > ,
1020
+ CC : IpDeviceSendContext < I , BC , DeviceId : filter :: InterfaceProperties < BC :: DeviceClass > >
1021
+ + FilterHandlerProvider < I , BC > ,
1035
1022
{
1036
- type DeviceId_ = Self :: DeviceId ;
1037
1023
}
1038
1024
1039
1025
/// A builder for IPv4 state.
0 commit comments