pub enum NetError {
Show 17 variants
Io(Error),
Connection(String),
Protocol(String),
Timeout(String),
InvalidUrl(String),
Http {
status: u16,
message: String,
},
Parse {
offset: u64,
message: String,
},
InvalidState(String),
Handshake(String),
Authentication(String),
NotFound(String),
Segment(String),
Playlist(String),
Encoding(String),
Buffer(String),
Eof,
Core(OxiError),
}Expand description
Error type for network streaming operations.
This enum covers all possible errors that can occur during network streaming, including connection errors, protocol errors, and timeouts.
Variants§
Io(Error)
I/O error during network operations.
Connection(String)
Connection error.
Protocol(String)
Protocol error with description.
Timeout(String)
Timeout during network operation.
InvalidUrl(String)
Invalid URL format.
Http
HTTP error with status code.
Parse
Parse error in protocol data.
Fields
InvalidState(String)
Invalid state for the requested operation.
Handshake(String)
Handshake failed.
Authentication(String)
Authentication failed.
NotFound(String)
Resource not found.
Segment(String)
Segment error in streaming protocols.
Playlist(String)
Playlist error in HLS/DASH.
Encoding(String)
Encoding/decoding error.
Buffer(String)
Buffer overflow or underflow.
Eof
End of stream reached.
Core(OxiError)
Core library error.
Implementations§
Source§impl NetError
impl NetError
Sourcepub fn connection(message: impl Into<String>) -> Self
pub fn connection(message: impl Into<String>) -> Self
Creates a new connection error.
Sourcepub fn invalid_url(message: impl Into<String>) -> Self
pub fn invalid_url(message: impl Into<String>) -> Self
Creates a new invalid URL error.
Sourcepub fn invalid_state(message: impl Into<String>) -> Self
pub fn invalid_state(message: impl Into<String>) -> Self
Creates a new invalid state error.
Sourcepub fn authentication(message: impl Into<String>) -> Self
pub fn authentication(message: impl Into<String>) -> Self
Creates a new authentication error.
Sourcepub const fn is_timeout(&self) -> bool
pub const fn is_timeout(&self) -> bool
Returns true if this is a timeout error.
Sourcepub const fn is_connection(&self) -> bool
pub const fn is_connection(&self) -> bool
Returns true if this is a connection error.
Trait Implementations§
Source§impl Error for NetError
impl Error for NetError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for NetError
impl !UnwindSafe for NetError
impl Freeze for NetError
impl Send for NetError
impl Sync for NetError
impl Unpin for NetError
impl UnsafeUnpin for NetError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<E> OxiErrorExt for Ewhere
E: Error,
impl<E> OxiErrorExt for Ewhere
E: Error,
Source§fn with_oxi_context(self, frame: ErrorFrame) -> OxiError
fn with_oxi_context(self, frame: ErrorFrame) -> OxiError
self by prepending the frame’s display string as context.