pub struct Sender<'a, L: Link, S: Sleep> { /* private fields */ }
Expand description
A struct to send the Datagram
to the devices.
Implementations§
Source§impl<L: Link, S: Sleep> Sender<'_, L, S>
impl<L: Link, S: Sleep> Sender<'_, L, S>
Sourcepub fn send<D: Datagram>(&mut self, s: D) -> Result<(), AUTDDriverError>
pub fn send<D: Datagram>(&mut self, s: D) -> Result<(), AUTDDriverError>
Send the Datagram
to the devices.
If the timeout
value is
- greater than 0, this function waits until the sent data is processed by the device or the specified timeout time elapses. If it cannot be confirmed that the sent data has been processed by the device,
AUTDDriverError::ConfirmResponseFailed
is returned. - 0, this function does not check whether the sent data has been processed by the device.
The calculation of each Datagram
is executed in parallel for each device if the number of enabled devices is greater than the parallel_threshold
.
Auto Trait Implementations§
impl<'a, L, S> Freeze for Sender<'a, L, S>where
S: Freeze,
impl<'a, L, S> RefUnwindSafe for Sender<'a, L, S>where
S: RefUnwindSafe,
L: RefUnwindSafe,
impl<'a, L, S> Send for Sender<'a, L, S>where
S: Send,
impl<'a, L, S> Sync for Sender<'a, L, S>
impl<'a, L, S> Unpin for Sender<'a, L, S>where
S: Unpin,
impl<'a, L, S> !UnwindSafe for Sender<'a, L, S>
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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.