#[non_exhaustive]pub enum RepositoryError {
MessageNotFound(MessageId),
ParentNotFound(MessageId),
Cycle(MessageId),
InvalidReplacement(MessageId),
}Expand description
An operation that would corrupt the tree. Upstream reports these as internal-bug exceptions; here the repository is left unchanged.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
MessageNotFound(MessageId)
No message has this id.
ParentNotFound(MessageId)
No message has the given parent id.
Cycle(MessageId)
The update would make a message its own ancestor.
InvalidReplacement(MessageId)
The replacement is the deleted message or one of its descendants.
Trait Implementations§
Source§impl Clone for RepositoryError
impl Clone for RepositoryError
Source§impl Debug for RepositoryError
impl Debug for RepositoryError
Source§impl Display for RepositoryError
impl Display for RepositoryError
impl Eq for RepositoryError
Source§impl Error for RepositoryError
impl Error for RepositoryError
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 From<RepositoryError> for RuntimeError
impl From<RepositoryError> for RuntimeError
Source§fn from(error: RepositoryError) -> Self
fn from(error: RepositoryError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for RepositoryError
impl PartialEq for RepositoryError
impl StructuralPartialEq for RepositoryError
Auto Trait Implementations§
impl Forget for RepositoryError
impl Freeze for RepositoryError
impl Move for RepositoryError
impl RefUnwindSafe for RepositoryError
impl Send for RepositoryError
impl Sync for RepositoryError
impl Unpin for RepositoryError
impl UnsafeUnpin for RepositoryError
impl UnwindSafe for RepositoryError
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