#[non_exhaustive]pub struct DuplicateMethodError {
pub method: String,
}Expand description
Returned by Dispatcher::try_register when a handler is already
registered under the requested method name.
Added in bd:JMAP-jfia.4 alongside try_register to make the
duplicate-registration foot-gun explicit at the call site rather
than silently dropping a binding.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.method: StringThe method name that was already registered.
Trait Implementations§
Source§impl Clone for DuplicateMethodError
impl Clone for DuplicateMethodError
Source§fn clone(&self) -> DuplicateMethodError
fn clone(&self) -> DuplicateMethodError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DuplicateMethodError
impl Debug for DuplicateMethodError
Source§impl Display for DuplicateMethodError
impl Display for DuplicateMethodError
impl Eq for DuplicateMethodError
Source§impl Error for DuplicateMethodError
impl Error for DuplicateMethodError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for DuplicateMethodError
impl PartialEq for DuplicateMethodError
Source§fn eq(&self, other: &DuplicateMethodError) -> bool
fn eq(&self, other: &DuplicateMethodError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DuplicateMethodError
Auto Trait Implementations§
impl Freeze for DuplicateMethodError
impl RefUnwindSafe for DuplicateMethodError
impl Send for DuplicateMethodError
impl Sync for DuplicateMethodError
impl Unpin for DuplicateMethodError
impl UnsafeUnpin for DuplicateMethodError
impl UnwindSafe for DuplicateMethodError
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
Mutably borrows from an owned value. Read more