pub struct SnapServer { /* private fields */ }Expand description
The embeddable Snapcast server.
Implementations§
Source§impl SnapServer
impl SnapServer
Sourcepub fn new(
config: ServerConfig,
) -> (Self, Receiver<ServerEvent>, Sender<AudioFrame>)
pub fn new( config: ServerConfig, ) -> (Self, Receiver<ServerEvent>, Sender<AudioFrame>)
Create a new server. Returns the server, event receiver, and audio input sender.
The audio_tx sender allows the embedding app to push PCM audio directly
into the server as an alternative to pipe/file/process stream readers.
Sourcepub fn set_manager(&mut self, manager: StreamManager)
pub fn set_manager(&mut self, manager: StreamManager)
Set the stream manager (configured by the binary with stream readers).
Sourcepub fn command_sender(&self) -> Sender<ServerCommand>
pub fn command_sender(&self) -> Sender<ServerCommand>
Get a cloneable command sender.
Sourcepub fn config(&self) -> &ServerConfig
pub fn config(&self) -> &ServerConfig
Access the server configuration.
Auto Trait Implementations§
impl Freeze for SnapServer
impl !RefUnwindSafe for SnapServer
impl Send for SnapServer
impl Sync for SnapServer
impl Unpin for SnapServer
impl UnsafeUnpin for SnapServer
impl !UnwindSafe for SnapServer
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