Enum cpal::PlayStreamError
source · pub enum PlayStreamError {
DeviceNotAvailable,
BackendSpecific {
err: BackendSpecificError,
},
}
Expand description
Errors that might occur when calling Stream::play()
.
As of writing this, only macOS may immediately return an error while calling this method. This is because both the alsa and wasapi backends only enqueue these commands and do not process them immediately.
Variants§
DeviceNotAvailable
The device associated with the stream is no longer available.
BackendSpecific
See the BackendSpecificError
docs for more information about this error variant.
Fields
Trait Implementations§
source§impl Debug for PlayStreamError
impl Debug for PlayStreamError
source§impl Display for PlayStreamError
impl Display for PlayStreamError
source§impl Error for PlayStreamError
impl Error for PlayStreamError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<BackendSpecificError> for PlayStreamError
impl From<BackendSpecificError> for PlayStreamError
source§fn from(err: BackendSpecificError) -> Self
fn from(err: BackendSpecificError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for PlayStreamError
impl RefUnwindSafe for PlayStreamError
impl Send for PlayStreamError
impl Sync for PlayStreamError
impl Unpin for PlayStreamError
impl UnwindSafe for PlayStreamError
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