pub enum Error {
Show 18 variants
Shutdown,
DuplicateObject,
InvalidObject,
DuplicateService,
InvalidService,
InvalidFunction(InvalidFunction),
InvalidArguments(InvalidArguments),
CallAborted,
RequiredFieldMissing(RequiredFieldMissing),
InvalidReply(InvalidReply),
InvalidChannel,
InvalidItem(InvalidItem),
InvalidBusListener,
BusListenerAlreadyStarted,
BusListenerNotStarted,
InvalidLifetime,
Serialize(SerializeError),
NotSupported,
}
Expand description
Standard error type used for most functions.
Variants§
Shutdown
The client has shut down.
DuplicateObject
An object could not be created because its UUID exists already.
InvalidObject
An invalid object id was used.
This typically indicates that the object was destroyed.
DuplicateService
An service could not be created because its UUID exists already on the object.
InvalidService
An invalid service id was used.
This typically indicates that the service or owning object was destroyed.
InvalidFunction(InvalidFunction)
An invalid function was called.
This can indicate a schema mismatch.
InvalidArguments(InvalidArguments)
Invalid arguments were supplied to a function or event.
This can indicate a schema mismatch.
CallAborted
A call was aborted.
RequiredFieldMissing(RequiredFieldMissing)
A field that is required for some type is missing.
InvalidReply(InvalidReply)
An invalid reply was received for a call.
This can indicate a schema mismatch.
InvalidChannel
An invalid channel was used.
InvalidItem(InvalidItem)
An invalid item was received on a channel.
This can indicate a schema mismatch.
InvalidBusListener
An invalid bus was used.
BusListenerAlreadyStarted
A bus listener was started, that is already started.
BusListenerNotStarted
A bus listener was stopped, that is already stopped.
InvalidLifetime
An invalid lifetime was used.
Serialize(SerializeError)
A value failed to serialized.
NotSupported
The negotiated protocol version is too low.
Implementations§
source§impl Error
impl Error
sourcepub fn invalid_function(function: u32) -> Self
pub fn invalid_function(function: u32) -> Self
Creates a new InvalidFunction
error.
sourcepub fn invalid_arguments(id: u32, source: Option<DeserializeError>) -> Self
pub fn invalid_arguments(id: u32, source: Option<DeserializeError>) -> Self
Creates a new InvalidArguments
error.
sourcepub fn required_field_missing(field: u32) -> Self
pub fn required_field_missing(field: u32) -> Self
Creates a new RequiredFieldMissing
error.
sourcepub fn invalid_reply(source: DeserializeError) -> Self
pub fn invalid_reply(source: DeserializeError) -> Self
Creates a new InvalidReply
error.
sourcepub fn invalid_item(source: DeserializeError) -> Self
pub fn invalid_item(source: DeserializeError) -> Self
Creates a new InvalidItem
error.
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
source§impl From<InvalidArguments> for Error
impl From<InvalidArguments> for Error
source§fn from(source: InvalidArguments) -> Self
fn from(source: InvalidArguments) -> Self
source§impl From<InvalidFunction> for Error
impl From<InvalidFunction> for Error
source§fn from(source: InvalidFunction) -> Self
fn from(source: InvalidFunction) -> Self
source§impl From<InvalidItem> for Error
impl From<InvalidItem> for Error
source§fn from(source: InvalidItem) -> Self
fn from(source: InvalidItem) -> Self
source§impl From<InvalidReply> for Error
impl From<InvalidReply> for Error
source§fn from(source: InvalidReply) -> Self
fn from(source: InvalidReply) -> Self
source§impl From<RequiredFieldMissing> for Error
impl From<RequiredFieldMissing> for Error
source§fn from(source: RequiredFieldMissing) -> Self
fn from(source: RequiredFieldMissing) -> Self
source§impl From<SerializeError> for Error
impl From<SerializeError> for Error
source§fn from(source: SerializeError) -> Self
fn from(source: SerializeError) -> Self
impl Copy for Error
impl Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)