Struct canadensis::requester::Requester
source · [−]pub struct Requester<I: Instant, T: Transmitter<I>, R> { /* private fields */ }
Expand description
Assembles transfers and manages transfer IDs to send service requests
Implementations
sourceimpl<I: Instant, T: Transmitter<I>, R: TransferIdTracker<T::Transport>> Requester<I, T, R>
impl<I: Instant, T: Transmitter<I>, R: TransferIdTracker<T::Transport>> Requester<I, T, R>
sourcepub fn new(
this_node: <T::Transport as Transport>::NodeId,
timeout: I::Duration,
priority: <T::Transport as Transport>::Priority
) -> Self
pub fn new(
this_node: <T::Transport as Transport>::NodeId,
timeout: I::Duration,
priority: <T::Transport as Transport>::Priority
) -> Self
Creates a service request transmitter
this_node: The ID of this node
priority: The priority to use for messages
service: The service ID to request
sourcepub fn send<Q, C>(
&mut self,
clock: &mut C,
service: ServiceId,
payload: &Q,
destination: <T::Transport as Transport>::NodeId,
transmitter: &mut T,
driver: &mut T::Driver
) -> Result<<T::Transport as Transport>::TransferId, T::Error> where
Q: Serialize + Request,
C: Clock<Instant = I>,
pub fn send<Q, C>(
&mut self,
clock: &mut C,
service: ServiceId,
payload: &Q,
destination: <T::Transport as Transport>::NodeId,
transmitter: &mut T,
driver: &mut T::Driver
) -> Result<<T::Transport as Transport>::TransferId, T::Error> where
Q: Serialize + Request,
C: Clock<Instant = I>,
Sends a service request and returns its transfer ID
Trait Implementations
Auto Trait Implementations
impl<I, T, R> RefUnwindSafe for Requester<I, T, R> where
R: RefUnwindSafe,
<I as Instant>::Duration: RefUnwindSafe,
<<T as Transmitter<I>>::Transport as Transport>::NodeId: RefUnwindSafe,
<<T as Transmitter<I>>::Transport as Transport>::Priority: RefUnwindSafe,
impl<I, T, R> Send for Requester<I, T, R> where
R: Send,
<I as Instant>::Duration: Send,
<<T as Transmitter<I>>::Transport as Transport>::NodeId: Send,
<<T as Transmitter<I>>::Transport as Transport>::Priority: Send,
impl<I, T, R> Sync for Requester<I, T, R> where
R: Sync,
<I as Instant>::Duration: Sync,
<<T as Transmitter<I>>::Transport as Transport>::NodeId: Sync,
<<T as Transmitter<I>>::Transport as Transport>::Priority: Sync,
impl<I, T, R> Unpin for Requester<I, T, R> where
R: Unpin,
<I as Instant>::Duration: Unpin,
<<T as Transmitter<I>>::Transport as Transport>::NodeId: Unpin,
<<T as Transmitter<I>>::Transport as Transport>::Priority: Unpin,
impl<I, T, R> UnwindSafe for Requester<I, T, R> where
R: UnwindSafe,
<I as Instant>::Duration: UnwindSafe,
<<T as Transmitter<I>>::Transport as Transport>::NodeId: UnwindSafe,
<<T as Transmitter<I>>::Transport as Transport>::Priority: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more