#[non_exhaustive]pub enum Error {
SocketIo(Error),
UnknownClient(String),
AlreadyExists(String),
AccessDenied(String),
UnknownAck(u64),
Reserved(String),
UrlNotAllowed,
TooManySubscriptions(usize),
TooManyClients(usize),
NotConfigurable(String),
InvalidOptions(String),
}Expand description
Errors of the plugin. Over the IPC they become { kind, message, data? } (see
ErrorPayload); guest-js throws them as SocketIoError.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
SocketIo(Error)
The socket.io client failed (connect, emit, ack timeout, …).
UnknownClient(String)
No client is registered under this id.
AlreadyExists(String)
A client is registered under this id already (remove it first).
AccessDenied(String)
The client is Access::ReadOnly: the webview may not emit,
ack or disconnect it.
UnknownAck(u64)
The server ack was answered already, expired, or was not offered to this webview.
Reserved(String)
Rust reserved this id (SocketIo::reserve): the webview may
not connect a client under it.
UrlNotAllowed
The URL is outside the plugin’s allow-list (Builder::allow_url_prefix).
TooManySubscriptions(usize)
The webview has MAX_SUBSCRIPTIONS_PER_WEBVIEW
subscriptions already.
TooManyClients(usize)
The webview has MAX_CLIENTS_PER_WEBVIEW clients it
connected already.
NotConfigurable(String)
setAuth / setHeaders / setQuery on a client the webview did not connect (Rust
built it; Rust decides what it sends).
InvalidOptions(String)
A connect option or argument has the wrong type or value (the value itself is not shown).
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()