pub enum InsertError {
Duplicate(DuplicateError),
Bflatn(Error),
IndexError(UniqueConstraintViolation),
}Expand description
Various error that can happen on table insertion.
Variants§
Duplicate(DuplicateError)
There was already a row with the same value.
Bflatn(Error)
Couldn’t write the row to the page manager.
IndexError(UniqueConstraintViolation)
Some index related error occurred.
Implementations§
Source§impl InsertError
impl InsertError
Sourcepub fn is_duplicate(&self) -> bool
pub fn is_duplicate(&self) -> bool
Returns true if this is a InsertError::Duplicate, otherwise false
Sourcepub fn as_duplicate_mut(&mut self) -> Option<&mut DuplicateError>
pub fn as_duplicate_mut(&mut self) -> Option<&mut DuplicateError>
Optionally returns mutable references to the inner fields if this is a InsertError::Duplicate, otherwise None
Sourcepub fn as_duplicate(&self) -> Option<&DuplicateError>
pub fn as_duplicate(&self) -> Option<&DuplicateError>
Optionally returns references to the inner fields if this is a InsertError::Duplicate, otherwise None
Sourcepub fn into_duplicate(self) -> Result<DuplicateError, Self>
pub fn into_duplicate(self) -> Result<DuplicateError, Self>
Returns the inner fields if this is a InsertError::Duplicate, otherwise returns back the enum in the Err case of the result
Sourcepub fn as_bflatn_mut(&mut self) -> Option<&mut Error>
pub fn as_bflatn_mut(&mut self) -> Option<&mut Error>
Optionally returns mutable references to the inner fields if this is a InsertError::Bflatn, otherwise None
Sourcepub fn as_bflatn(&self) -> Option<&Error>
pub fn as_bflatn(&self) -> Option<&Error>
Optionally returns references to the inner fields if this is a InsertError::Bflatn, otherwise None
Sourcepub fn into_bflatn(self) -> Result<Error, Self>
pub fn into_bflatn(self) -> Result<Error, Self>
Returns the inner fields if this is a InsertError::Bflatn, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_index_error(&self) -> bool
pub fn is_index_error(&self) -> bool
Returns true if this is a InsertError::IndexError, otherwise false
Sourcepub fn as_index_error_mut(&mut self) -> Option<&mut UniqueConstraintViolation>
pub fn as_index_error_mut(&mut self) -> Option<&mut UniqueConstraintViolation>
Optionally returns mutable references to the inner fields if this is a InsertError::IndexError, otherwise None
Sourcepub fn as_index_error(&self) -> Option<&UniqueConstraintViolation>
pub fn as_index_error(&self) -> Option<&UniqueConstraintViolation>
Optionally returns references to the inner fields if this is a InsertError::IndexError, otherwise None
Sourcepub fn into_index_error(self) -> Result<UniqueConstraintViolation, Self>
pub fn into_index_error(self) -> Result<UniqueConstraintViolation, Self>
Returns the inner fields if this is a InsertError::IndexError, otherwise returns back the enum in the Err case of the result
Trait Implementations§
Source§impl Debug for InsertError
impl Debug for InsertError
Source§impl Display for InsertError
impl Display for InsertError
Source§impl Error for InsertError
impl Error for InsertError
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<DuplicateError> for InsertError
impl From<DuplicateError> for InsertError
Source§fn from(source: DuplicateError) -> Self
fn from(source: DuplicateError) -> Self
Source§impl From<Error> for InsertError
impl From<Error> for InsertError
Source§impl From<UniqueConstraintViolation> for InsertError
impl From<UniqueConstraintViolation> for InsertError
Source§fn from(source: UniqueConstraintViolation) -> Self
fn from(source: UniqueConstraintViolation) -> Self
Source§impl PartialEq for InsertError
impl PartialEq for InsertError
impl Eq for InsertError
impl StructuralPartialEq for InsertError
Auto Trait Implementations§
impl Freeze for InsertError
impl RefUnwindSafe for InsertError
impl Send for InsertError
impl Sync for InsertError
impl Unpin for InsertError
impl UnwindSafe for InsertError
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more