Struct ether_dream_dac_emulator::broadcaster::Handle
[−]
[src]
pub struct Handle { /* fields omitted */ }
A Handle for asynchronously communicating with the Broadcaster
thread.
Handle is returned by the Broadcaster::spawn method.
Methods
impl Handle
[src]
pub fn send(&self) -> Result<(), SendError<()>>
[src]
Send a Message::Send to the Broadcaster thread, causing it to send a DacBroadcast over UDP.
Returns an Err if the Broadcaster thread has been closed.
pub fn dac(&self, dac: Addressed) -> Result<(), SendError<()>>
[src]
Send a DAC update to the Broadcaster thread.
Returns an Err if the Broadcaster thread has been closed.
pub fn spawn_once_per_second_timer(&self) -> Result<()>
[src]
Spawns a Timer that sends Message::Send to the Broadcaster thread once per second.
If this was already called and a timer is already running, the existing timer will be closed and this timer will replace it.
pub fn close(self) -> Option<JoinHandle<Result<Broadcaster>>>
[src]
Consume self
and return the handle to the Broadcaster thread for join
ing.
None
is returned if the close was already called from another Handle.
Trait Implementations
impl Clone for Handle
[src]
fn clone(&self) -> Handle
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more