pub struct PromotionError { /* private fields */ }Expand description
One promotion failure with a stable code and contextual explanation.
Implementations§
Source§impl PromotionError
impl PromotionError
Sourcepub fn new(code: FailureCode, message: impl Into<String>) -> Self
pub fn new(code: FailureCode, message: impl Into<String>) -> Self
Creates a failure at a specific evidence boundary.
Sourcepub const fn code(&self) -> FailureCode
pub const fn code(&self) -> FailureCode
Returns the stable failure code.
Trait Implementations§
Source§impl Clone for PromotionError
impl Clone for PromotionError
Source§fn clone(&self) -> PromotionError
fn clone(&self) -> PromotionError
Returns a duplicate of the value. Read more
1.0.0 · 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 PromotionError
impl Debug for PromotionError
Source§impl Display for PromotionError
impl Display for PromotionError
Source§impl Error for PromotionError
impl Error for PromotionError
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 PromotionError
impl PartialEq for PromotionError
impl Eq for PromotionError
impl StructuralPartialEq for PromotionError
Auto Trait Implementations§
impl Freeze for PromotionError
impl RefUnwindSafe for PromotionError
impl Send for PromotionError
impl Sync for PromotionError
impl Unpin for PromotionError
impl UnsafeUnpin for PromotionError
impl UnwindSafe for PromotionError
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