pub struct WithFiniteLoop<T: TransitionMode, D> {
pub inner: D,
pub loop_count: NonZeroU16,
pub segment: Segment,
pub transition_mode: T,
}
Expand description
A wrapper of DatagramL
to specify the loop behavior.
Note that the loop behavior only affects when switching segments.
Fields§
§inner: D
The original DatagramL
loop_count: NonZeroU16
The loop count
segment: Segment
The segment to write the data
transition_mode: T
The behavior when switching segments
Implementations§
Source§impl<'a, T, D> WithFiniteLoop<T, D>where
T: TransitionMode,
D: DatagramL<'a> + HasFiniteLoop<T>,
impl<'a, T, D> WithFiniteLoop<T, D>where
T: TransitionMode,
D: DatagramL<'a> + HasFiniteLoop<T>,
Sourcepub const fn new(
inner: D,
loop_count: NonZeroU16,
segment: Segment,
transition_mode: T,
) -> Self
pub const fn new( inner: D, loop_count: NonZeroU16, segment: Segment, transition_mode: T, ) -> Self
Create a new WithFiniteLoop
.
Trait Implementations§
Source§impl<T: Clone + TransitionMode, D: Clone> Clone for WithFiniteLoop<T, D>
impl<T: Clone + TransitionMode, D: Clone> Clone for WithFiniteLoop<T, D>
Source§fn clone(&self) -> WithFiniteLoop<T, D>
fn clone(&self) -> WithFiniteLoop<T, D>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a, T, D> Datagram<'a> for WithFiniteLoop<T, D>where
T: TransitionMode,
D: DatagramL<'a> + HasFiniteLoop<T>,
impl<'a, T, D> Datagram<'a> for WithFiniteLoop<T, D>where
T: TransitionMode,
D: DatagramL<'a> + HasFiniteLoop<T>,
Source§fn option(&self) -> DatagramOption
fn option(&self) -> DatagramOption
Returns the option of the datagram.
Source§impl<T: Debug + TransitionMode, D: Debug> Debug for WithFiniteLoop<T, D>
impl<T: Debug + TransitionMode, D: Debug> Debug for WithFiniteLoop<T, D>
Source§impl<T: Hash + TransitionMode, D: Hash> Hash for WithFiniteLoop<T, D>
impl<T: Hash + TransitionMode, D: Hash> Hash for WithFiniteLoop<T, D>
Source§impl<'a, T, D> Inspectable<'a> for WithFiniteLoop<T, D>where
T: TransitionMode,
D: Inspectable<'a> + DatagramL<'a> + HasFiniteLoop<T>,
<D as DatagramL<'a>>::Error: From<<D as Datagram<'a>>::Error>,
impl<'a, T, D> Inspectable<'a> for WithFiniteLoop<T, D>where
T: TransitionMode,
D: Inspectable<'a> + DatagramL<'a> + HasFiniteLoop<T>,
<D as DatagramL<'a>>::Error: From<<D as Datagram<'a>>::Error>,
Source§type Result = WithFiniteLoopInspectionResult<<D as Inspectable<'a>>::Result, T>
type Result = WithFiniteLoopInspectionResult<<D as Inspectable<'a>>::Result, T>
The result of the inspection.
Source§fn inspect(
self,
geometry: &'a Geometry,
env: &Environment,
filter: &DeviceMask,
limits: &FirmwareLimits,
) -> Result<InspectionResult<Self::Result>, Self::Error>
fn inspect( self, geometry: &'a Geometry, env: &Environment, filter: &DeviceMask, limits: &FirmwareLimits, ) -> Result<InspectionResult<Self::Result>, Self::Error>
Returns the inspection result.
Source§impl<T: PartialEq + TransitionMode, D: PartialEq> PartialEq for WithFiniteLoop<T, D>
impl<T: PartialEq + TransitionMode, D: PartialEq> PartialEq for WithFiniteLoop<T, D>
impl<T: Copy + TransitionMode, D: Copy> Copy for WithFiniteLoop<T, D>
impl<T: Eq + TransitionMode, D: Eq> Eq for WithFiniteLoop<T, D>
impl<T: TransitionMode, D> StructuralPartialEq for WithFiniteLoop<T, D>
Auto Trait Implementations§
impl<T, D> Freeze for WithFiniteLoop<T, D>
impl<T, D> RefUnwindSafe for WithFiniteLoop<T, D>where
D: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, D> Send for WithFiniteLoop<T, D>where
D: Send,
impl<T, D> Sync for WithFiniteLoop<T, D>where
D: Sync,
impl<T, D> Unpin for WithFiniteLoop<T, D>
impl<T, D> UnwindSafe for WithFiniteLoop<T, D>where
D: UnwindSafe,
T: UnwindSafe,
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.