pub struct ServerBuilder { /* private fields */ }
Implementations§
Source§impl ServerBuilder
impl ServerBuilder
pub fn new() -> ServerBuilder
Sourcepub fn add_source(self, capabilities: Vec<PacRecord>) -> Self
pub fn add_source(self, capabilities: Vec<PacRecord>) -> Self
Adds a source PAC characteristic to the builder.
Each call adds a new characteristic.
capabilities
represents the records for a single PAC characteristic.
If capabilities
is empty, it will be ignored.
Sourcepub fn set_source_locations(self, audio_locations: AudioLocations) -> Self
pub fn set_source_locations(self, audio_locations: AudioLocations) -> Self
Sets the audio locations for the source. This corresponds to a single Source Audio Locations characteristic.
Sourcepub fn add_sink(self, capabilities: Vec<PacRecord>) -> Self
pub fn add_sink(self, capabilities: Vec<PacRecord>) -> Self
Adds a sink PAC characteristic to the builder.
Each call adds a new characteristic.
capabilities
represents the records for a single PAC characteristic.
If capabilities
is empty, it will be ignored.
Sourcepub fn set_sink_locations(self, audio_locations: AudioLocations) -> Self
pub fn set_sink_locations(self, audio_locations: AudioLocations) -> Self
Sets the audio locations for the sink. This corresponds to a single Sink Audio Locations characteristic.
Sourcepub fn build<T>(
self,
supported: AudioContexts,
available: AudioContexts,
) -> Result<Server<T>, Error>where
T: ServerTypes,
pub fn build<T>(
self,
supported: AudioContexts,
available: AudioContexts,
) -> Result<Server<T>, Error>where
T: ServerTypes,
Builds a server after verifying all the defined characteristics for this server (see PACS v1.0.1 section 3 for details).
Trait Implementations§
Source§impl Default for ServerBuilder
impl Default for ServerBuilder
Source§fn default() -> ServerBuilder
fn default() -> ServerBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ServerBuilder
impl RefUnwindSafe for ServerBuilder
impl Send for ServerBuilder
impl Sync for ServerBuilder
impl Unpin for ServerBuilder
impl UnwindSafe for ServerBuilder
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