pub struct EthSysHandlerBuilder<'a> { /* private fields */ }Expand description
Builder for an Ethernet root-endpoint system handler.
Unset hooks fall back to no-op defaults: &true for CommPolicy
(commissioning open / allowed) and &() for every other trait
(reports nothing / no-op).
let h = EthSysHandlerBuilder::new()
.gen_diag(&my_gen_diag)
.netif_diag(&SysNetifs)
.build(rand);Implementations§
Source§impl<'a> EthSysHandlerBuilder<'a>
impl<'a> EthSysHandlerBuilder<'a>
Sourcepub const fn new() -> EthSysHandlerBuilder<'a>
pub const fn new() -> EthSysHandlerBuilder<'a>
Create a builder. Every hook defaults to a no-op provider.
Sourcepub const fn comm_policy(
self,
comm_policy: &'a dyn CommPolicy,
) -> EthSysHandlerBuilder<'a>
pub const fn comm_policy( self, comm_policy: &'a dyn CommPolicy, ) -> EthSysHandlerBuilder<'a>
Set the CommPolicy hook (commissioning window policy).
Sourcepub const fn gen_diag(
self,
gen_diag: &'a dyn GenDiag,
) -> EthSysHandlerBuilder<'a>
pub const fn gen_diag( self, gen_diag: &'a dyn GenDiag, ) -> EthSysHandlerBuilder<'a>
Set the GenDiag hook (General Diagnostics data provider).
Sourcepub const fn netif_diag(
self,
netif_diag: &'a dyn NetifDiag,
) -> EthSysHandlerBuilder<'a>
pub const fn netif_diag( self, netif_diag: &'a dyn NetifDiag, ) -> EthSysHandlerBuilder<'a>
Set the NetifDiag hook (network-interface enumeration).
Sourcepub const fn time_sync(
self,
time_sync: &'a dyn TimeSync,
) -> EthSysHandlerBuilder<'a>
pub const fn time_sync( self, time_sync: &'a dyn TimeSync, ) -> EthSysHandlerBuilder<'a>
Set the TimeSync hook (feature-gated members of the Time
Synchronization cluster — TIME_ZONE / NTP_CLIENT /
NTP_SERVER / TIME_SYNC_CLIENT). The mandatory members
(UTCTime, Granularity, TimeSource, SetUTCTime) are
always served from the Matter-wide
Last-Known-Good UTC Time
state and don’t need a provider.
Sourcepub const fn sw_diag(self, sw_diag: &'a dyn SwDiag) -> EthSysHandlerBuilder<'a>
pub const fn sw_diag(self, sw_diag: &'a dyn SwDiag) -> EthSysHandlerBuilder<'a>
Set the SwDiag hook (Software Diagnostics data provider).
Sourcepub fn build<R>(
self,
rand: R,
) -> ChainedHandler<EpClMatcher, HandlerAsyncAdaptor<NetCommHandler<EthNetCtl>>, Async<ChainedHandler<EpClMatcher, HandlerAdaptor<DescHandler<'a>>, ChainedHandler<EpClMatcher, HandlerAdaptor<BasicInfoHandler>, ChainedHandler<EpClMatcher, HandlerAdaptor<GenCommHandler<'a>>, ChainedHandler<EpClMatcher, HandlerAdaptor<AdminCommHandler>, ChainedHandler<EpClMatcher, HandlerAdaptor<NocHandler>, ChainedHandler<EpClMatcher, HandlerAdaptor<AclHandler>, ChainedHandler<EpClMatcher, HandlerAdaptor<GrpKeyMgmtHandler>, ChainedHandler<EpClMatcher, HandlerAdaptor<SwDiagHandler<'a>>, ChainedHandler<EpClMatcher, HandlerAdaptor<TimeSyncHandler<'a>>, ChainedHandler<EpClMatcher, HandlerAdaptor<GenDiagHandler<'a>>, ChainedHandler<EpClMatcher, HandlerAdaptor<EthDiagHandler>, EmptyHandler>>>>>>>>>>>>>where
R: RngCore,
pub fn build<R>(
self,
rand: R,
) -> ChainedHandler<EpClMatcher, HandlerAsyncAdaptor<NetCommHandler<EthNetCtl>>, Async<ChainedHandler<EpClMatcher, HandlerAdaptor<DescHandler<'a>>, ChainedHandler<EpClMatcher, HandlerAdaptor<BasicInfoHandler>, ChainedHandler<EpClMatcher, HandlerAdaptor<GenCommHandler<'a>>, ChainedHandler<EpClMatcher, HandlerAdaptor<AdminCommHandler>, ChainedHandler<EpClMatcher, HandlerAdaptor<NocHandler>, ChainedHandler<EpClMatcher, HandlerAdaptor<AclHandler>, ChainedHandler<EpClMatcher, HandlerAdaptor<GrpKeyMgmtHandler>, ChainedHandler<EpClMatcher, HandlerAdaptor<SwDiagHandler<'a>>, ChainedHandler<EpClMatcher, HandlerAdaptor<TimeSyncHandler<'a>>, ChainedHandler<EpClMatcher, HandlerAdaptor<GenDiagHandler<'a>>, ChainedHandler<EpClMatcher, HandlerAdaptor<EthDiagHandler>, EmptyHandler>>>>>>>>>>>>>where
R: RngCore,
Build the Ethernet system handler.
Trait Implementations§
Source§impl Default for EthSysHandlerBuilder<'_>
impl Default for EthSysHandlerBuilder<'_>
Source§fn default() -> EthSysHandlerBuilder<'_>
fn default() -> EthSysHandlerBuilder<'_>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for EthSysHandlerBuilder<'a>
impl<'a> !Send for EthSysHandlerBuilder<'a>
impl<'a> !Sync for EthSysHandlerBuilder<'a>
impl<'a> !UnwindSafe for EthSysHandlerBuilder<'a>
impl<'a> Freeze for EthSysHandlerBuilder<'a>
impl<'a> Unpin for EthSysHandlerBuilder<'a>
impl<'a> UnsafeUnpin for EthSysHandlerBuilder<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more