pub struct Sender {
pub thread: ConnectionThread,
pub is_finished: Arc<Mutex<bool>>,
}Expand description
Describes a sender thread.
Sender thread is first of the two threads created on Bot::run
and serves a purpose of sending pose requests
(required to get broadcasts) and sending talk requests when needed.
Sender has a receiver handle of message channel, so anyone with a sender handle (callbacks, main function) can push those messages in and next time sender thread wants to send a pose request, it will also send the requested messages from the channel.
Fields§
§thread: ConnectionThreadThread JoinHandle
is_finished: Arc<Mutex<bool>>true if thread is still alive
Auto Trait Implementations§
impl Freeze for Sender
impl !RefUnwindSafe for Sender
impl Send for Sender
impl Sync for Sender
impl Unpin for Sender
impl !UnwindSafe for Sender
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