pub struct SnapClient {
pub time_provider: Arc<Mutex<TimeProvider>>,
pub stream: Arc<Mutex<Stream>>,
/* private fields */
}Expand description
The embeddable Snapcast client.
Fields§
§time_provider: Arc<Mutex<TimeProvider>>Shared time provider — accessible by the binary for audio output.
stream: Arc<Mutex<Stream>>Shared stream — accessible by the binary for audio output.
Implementations§
Source§impl SnapClient
impl SnapClient
Sourcepub fn new(
config: ClientConfig,
) -> (Self, Receiver<ClientEvent>, Receiver<AudioFrame>)
pub fn new( config: ClientConfig, ) -> (Self, Receiver<ClientEvent>, Receiver<AudioFrame>)
Create a new client. Returns the client, event receiver, and audio output receiver.
Sourcepub fn command_sender(&self) -> Sender<ClientCommand>
pub fn command_sender(&self) -> Sender<ClientCommand>
Get a cloneable command sender.
Auto Trait Implementations§
impl Freeze for SnapClient
impl RefUnwindSafe for SnapClient
impl Send for SnapClient
impl Sync for SnapClient
impl Unpin for SnapClient
impl UnsafeUnpin for SnapClient
impl UnwindSafe for SnapClient
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