pub enum LcuError {
NotRunning,
AuthTimeout,
Http(Error),
Status {
code: u16,
body: String,
},
WebSocket(Error),
Tls(Error),
InvalidHeader(String),
Json(Error),
Io(Error),
LockfileParse(String),
}Expand description
The unified error type for all league-link operations.
Variants§
NotRunning
No running League Client process was found.
AuthTimeout
authenticate exceeded its timeout without finding the client.
Http(Error)
Underlying reqwest transport error (DNS, TLS, body decode, timeout, …).
Status
The LCU returned a non-2xx status code.
Fields
WebSocket(Error)
WebSocket-level error from tokio-tungstenite.
Tls(Error)
TLS handshake or configuration failure.
InvalidHeader(String)
Could not construct a valid Authorization header from the credentials.
The contained string is the source error’s display message; the
concrete dependency type is intentionally not exposed so that
tungstenite upgrades are not breaking changes for this crate.
Json(Error)
JSON (de)serialization failure.
Io(Error)
Filesystem error while reading a lockfile.
LockfileParse(String)
The lockfile contents did not match the expected name:pid:port:password:protocol layout.
Trait Implementations§
Source§impl Error for LcuError
impl Error for LcuError
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 Freeze for LcuError
impl !RefUnwindSafe for LcuError
impl Send for LcuError
impl Sync for LcuError
impl Unpin for LcuError
impl UnsafeUnpin for LcuError
impl !UnwindSafe for LcuError
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<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.