pub struct DynKindMismatch {
pub got: Vec<DynKind>,
pub expected: &'static [&'static [DynKind]],
}Expand description
Returned by _dyn wrappers when the input combination has no
static algorithm impl.
Example: distance_dyn(&Polygon, &Polygon) — v1 has no
polygon-to-polygon distance impl yet. The wrapper returns
Err(DynKindMismatch { got: [Polygon, Polygon], expected: &[...] })
rather than panicking.
Fields§
§got: Vec<DynKind>The actual kinds of the inputs, in argument order.
expected: &'static [&'static [DynKind]]The kind combinations the algorithm supports. Each inner slice is one supported argument list.
Trait Implementations§
Source§impl Clone for DynKindMismatch
impl Clone for DynKindMismatch
Source§fn clone(&self) -> DynKindMismatch
fn clone(&self) -> DynKindMismatch
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 DynKindMismatch
impl Debug for DynKindMismatch
Source§impl Display for DynKindMismatch
impl Display for DynKindMismatch
impl Eq for DynKindMismatch
Source§impl Error for DynKindMismatch
Available on crate feature std only.
impl Error for DynKindMismatch
Available on crate feature
std only.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 DynKindMismatch
impl PartialEq for DynKindMismatch
impl StructuralPartialEq for DynKindMismatch
Auto Trait Implementations§
impl Freeze for DynKindMismatch
impl RefUnwindSafe for DynKindMismatch
impl Send for DynKindMismatch
impl Sync for DynKindMismatch
impl Unpin for DynKindMismatch
impl UnsafeUnpin for DynKindMismatch
impl UnwindSafe for DynKindMismatch
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