26 lines
869 B
Rust
26 lines
869 B
Rust
//! Provides stream messages that come from a running stream
|
|
use strum_macros::Display;
|
|
|
|
use super::*;
|
|
cfg_if::cfg_if! {
|
|
if #[cfg(feature = "python-bindings")] {
|
|
use pyo3::exceptions::PyValueError;
|
|
use pyo3::prelude::*;
|
|
use pyo3::{pymodule, pyclass, types::PyModule, PyResult};
|
|
} else {} }
|
|
|
|
/// Gives the stream status of a stream, either input / output or duplex.
|
|
#[derive(strum_macros::EnumMessage, Debug, Clone, Copy, Display)]
|
|
pub enum StreamStatus {
|
|
/// Stream is not running
|
|
#[strum(message = "NotRunning", detailed_message = "Stream is not running")]
|
|
NotRunning,
|
|
/// Stream is running properly
|
|
#[strum(message = "Running", detailed_message = "Stream is running")]
|
|
Running,
|
|
|
|
/// An error occured in the stream.
|
|
#[strum(message = "Error", detailed_message = "An error occured with the stream")]
|
|
Error(StreamError)
|
|
}
|