pub enum TableError {
Show 16 variants
System(Box<str>),
Exist(String),
NotFound(String),
IdNotFound(SystemTable, u32),
RawSqlNotFound(SystemTable, RawSql),
IdNotFoundState(TableId),
ColumnWithoutName(String, ColId),
InvalidSchema(TableId, LibError),
RowInvalidType {
table_id: TableId,
row: ProductValue,
},
RowDecodeError(DecodeError),
DuplicateColumnName(String),
ColumnNotFound(ColId),
DecodeField {
table: String,
field: Box<str>,
expect: String,
found: String,
},
Bflatn(Error),
Duplicate(DuplicateError),
ReadColTypeError(TypeError),
}Variants§
System(Box<str>)
Exist(String)
NotFound(String)
IdNotFound(SystemTable, u32)
RawSqlNotFound(SystemTable, RawSql)
IdNotFoundState(TableId)
ColumnWithoutName(String, ColId)
InvalidSchema(TableId, LibError)
RowInvalidType
RowDecodeError(DecodeError)
DuplicateColumnName(String)
ColumnNotFound(ColId)
DecodeField
Bflatn(Error)
Duplicate(DuplicateError)
ReadColTypeError(TypeError)
Implementations§
Source§impl TableError
impl TableError
Sourcepub fn as_system_mut(&mut self) -> Option<&mut Box<str>>
pub fn as_system_mut(&mut self) -> Option<&mut Box<str>>
Optionally returns mutable references to the inner fields if this is a TableError::System, otherwise None
Sourcepub fn as_system(&self) -> Option<&Box<str>>
pub fn as_system(&self) -> Option<&Box<str>>
Optionally returns references to the inner fields if this is a TableError::System, otherwise None
Sourcepub fn into_system(self) -> Result<Box<str>, Self>
pub fn into_system(self) -> Result<Box<str>, Self>
Returns the inner fields if this is a TableError::System, otherwise returns back the enum in the Err case of the result
Sourcepub fn as_exist_mut(&mut self) -> Option<&mut String>
pub fn as_exist_mut(&mut self) -> Option<&mut String>
Optionally returns mutable references to the inner fields if this is a TableError::Exist, otherwise None
Sourcepub fn as_exist(&self) -> Option<&String>
pub fn as_exist(&self) -> Option<&String>
Optionally returns references to the inner fields if this is a TableError::Exist, otherwise None
Sourcepub fn into_exist(self) -> Result<String, Self>
pub fn into_exist(self) -> Result<String, Self>
Returns the inner fields if this is a TableError::Exist, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_not_found(&self) -> bool
pub fn is_not_found(&self) -> bool
Returns true if this is a TableError::NotFound, otherwise false
Sourcepub fn as_not_found_mut(&mut self) -> Option<&mut String>
pub fn as_not_found_mut(&mut self) -> Option<&mut String>
Optionally returns mutable references to the inner fields if this is a TableError::NotFound, otherwise None
Sourcepub fn as_not_found(&self) -> Option<&String>
pub fn as_not_found(&self) -> Option<&String>
Optionally returns references to the inner fields if this is a TableError::NotFound, otherwise None
Sourcepub fn into_not_found(self) -> Result<String, Self>
pub fn into_not_found(self) -> Result<String, Self>
Returns the inner fields if this is a TableError::NotFound, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_id_not_found(&self) -> bool
pub fn is_id_not_found(&self) -> bool
Returns true if this is a TableError::IdNotFound, otherwise false
Sourcepub fn as_id_not_found_mut(&mut self) -> Option<(&mut SystemTable, &mut u32)>
pub fn as_id_not_found_mut(&mut self) -> Option<(&mut SystemTable, &mut u32)>
Optionally returns mutable references to the inner fields if this is a TableError::IdNotFound, otherwise None
Sourcepub fn as_id_not_found(&self) -> Option<(&SystemTable, &u32)>
pub fn as_id_not_found(&self) -> Option<(&SystemTable, &u32)>
Optionally returns references to the inner fields if this is a TableError::IdNotFound, otherwise None
Sourcepub fn into_id_not_found(self) -> Result<(SystemTable, u32), Self>
pub fn into_id_not_found(self) -> Result<(SystemTable, u32), Self>
Returns the inner fields if this is a TableError::IdNotFound, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_raw_sql_not_found(&self) -> bool
pub fn is_raw_sql_not_found(&self) -> bool
Returns true if this is a TableError::RawSqlNotFound, otherwise false
Sourcepub fn as_raw_sql_not_found_mut(
&mut self,
) -> Option<(&mut SystemTable, &mut RawSql)>
pub fn as_raw_sql_not_found_mut( &mut self, ) -> Option<(&mut SystemTable, &mut RawSql)>
Optionally returns mutable references to the inner fields if this is a TableError::RawSqlNotFound, otherwise None
Sourcepub fn as_raw_sql_not_found(&self) -> Option<(&SystemTable, &RawSql)>
pub fn as_raw_sql_not_found(&self) -> Option<(&SystemTable, &RawSql)>
Optionally returns references to the inner fields if this is a TableError::RawSqlNotFound, otherwise None
Sourcepub fn into_raw_sql_not_found(self) -> Result<(SystemTable, RawSql), Self>
pub fn into_raw_sql_not_found(self) -> Result<(SystemTable, RawSql), Self>
Returns the inner fields if this is a TableError::RawSqlNotFound, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_id_not_found_state(&self) -> bool
pub fn is_id_not_found_state(&self) -> bool
Returns true if this is a TableError::IdNotFoundState, otherwise false
Sourcepub fn as_id_not_found_state_mut(&mut self) -> Option<&mut TableId>
pub fn as_id_not_found_state_mut(&mut self) -> Option<&mut TableId>
Optionally returns mutable references to the inner fields if this is a TableError::IdNotFoundState, otherwise None
Sourcepub fn as_id_not_found_state(&self) -> Option<&TableId>
pub fn as_id_not_found_state(&self) -> Option<&TableId>
Optionally returns references to the inner fields if this is a TableError::IdNotFoundState, otherwise None
Sourcepub fn into_id_not_found_state(self) -> Result<TableId, Self>
pub fn into_id_not_found_state(self) -> Result<TableId, Self>
Returns the inner fields if this is a TableError::IdNotFoundState, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_column_without_name(&self) -> bool
pub fn is_column_without_name(&self) -> bool
Returns true if this is a TableError::ColumnWithoutName, otherwise false
Sourcepub fn as_column_without_name_mut(
&mut self,
) -> Option<(&mut String, &mut ColId)>
pub fn as_column_without_name_mut( &mut self, ) -> Option<(&mut String, &mut ColId)>
Optionally returns mutable references to the inner fields if this is a TableError::ColumnWithoutName, otherwise None
Sourcepub fn as_column_without_name(&self) -> Option<(&String, &ColId)>
pub fn as_column_without_name(&self) -> Option<(&String, &ColId)>
Optionally returns references to the inner fields if this is a TableError::ColumnWithoutName, otherwise None
Sourcepub fn into_column_without_name(self) -> Result<(String, ColId), Self>
pub fn into_column_without_name(self) -> Result<(String, ColId), Self>
Returns the inner fields if this is a TableError::ColumnWithoutName, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_invalid_schema(&self) -> bool
pub fn is_invalid_schema(&self) -> bool
Returns true if this is a TableError::InvalidSchema, otherwise false
Sourcepub fn as_invalid_schema_mut(&mut self) -> Option<(&mut TableId, &mut LibError)>
pub fn as_invalid_schema_mut(&mut self) -> Option<(&mut TableId, &mut LibError)>
Optionally returns mutable references to the inner fields if this is a TableError::InvalidSchema, otherwise None
Sourcepub fn as_invalid_schema(&self) -> Option<(&TableId, &LibError)>
pub fn as_invalid_schema(&self) -> Option<(&TableId, &LibError)>
Optionally returns references to the inner fields if this is a TableError::InvalidSchema, otherwise None
Sourcepub fn into_invalid_schema(self) -> Result<(TableId, LibError), Self>
pub fn into_invalid_schema(self) -> Result<(TableId, LibError), Self>
Returns the inner fields if this is a TableError::InvalidSchema, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_row_invalid_type(&self) -> bool
pub fn is_row_invalid_type(&self) -> bool
Returns true if this is a TableError::RowInvalidType, otherwise false
Sourcepub fn as_row_invalid_type_mut(
&mut self,
) -> Option<(&mut TableId, &mut ProductValue)>
pub fn as_row_invalid_type_mut( &mut self, ) -> Option<(&mut TableId, &mut ProductValue)>
Optionally returns mutable references to the inner fields if this is a TableError::RowInvalidType, otherwise None
Sourcepub fn as_row_invalid_type(&self) -> Option<(&TableId, &ProductValue)>
pub fn as_row_invalid_type(&self) -> Option<(&TableId, &ProductValue)>
Optionally returns references to the inner fields if this is a TableError::RowInvalidType, otherwise None
Sourcepub fn into_row_invalid_type(self) -> Result<(TableId, ProductValue), Self>
pub fn into_row_invalid_type(self) -> Result<(TableId, ProductValue), Self>
Returns the inner fields if this is a TableError::RowInvalidType, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_row_decode_error(&self) -> bool
pub fn is_row_decode_error(&self) -> bool
Returns true if this is a TableError::RowDecodeError, otherwise false
Sourcepub fn as_row_decode_error_mut(&mut self) -> Option<&mut DecodeError>
pub fn as_row_decode_error_mut(&mut self) -> Option<&mut DecodeError>
Optionally returns mutable references to the inner fields if this is a TableError::RowDecodeError, otherwise None
Sourcepub fn as_row_decode_error(&self) -> Option<&DecodeError>
pub fn as_row_decode_error(&self) -> Option<&DecodeError>
Optionally returns references to the inner fields if this is a TableError::RowDecodeError, otherwise None
Sourcepub fn into_row_decode_error(self) -> Result<DecodeError, Self>
pub fn into_row_decode_error(self) -> Result<DecodeError, Self>
Returns the inner fields if this is a TableError::RowDecodeError, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_duplicate_column_name(&self) -> bool
pub fn is_duplicate_column_name(&self) -> bool
Returns true if this is a TableError::DuplicateColumnName, otherwise false
Sourcepub fn as_duplicate_column_name_mut(&mut self) -> Option<&mut String>
pub fn as_duplicate_column_name_mut(&mut self) -> Option<&mut String>
Optionally returns mutable references to the inner fields if this is a TableError::DuplicateColumnName, otherwise None
Sourcepub fn as_duplicate_column_name(&self) -> Option<&String>
pub fn as_duplicate_column_name(&self) -> Option<&String>
Optionally returns references to the inner fields if this is a TableError::DuplicateColumnName, otherwise None
Sourcepub fn into_duplicate_column_name(self) -> Result<String, Self>
pub fn into_duplicate_column_name(self) -> Result<String, Self>
Returns the inner fields if this is a TableError::DuplicateColumnName, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_column_not_found(&self) -> bool
pub fn is_column_not_found(&self) -> bool
Returns true if this is a TableError::ColumnNotFound, otherwise false
Sourcepub fn as_column_not_found_mut(&mut self) -> Option<&mut ColId>
pub fn as_column_not_found_mut(&mut self) -> Option<&mut ColId>
Optionally returns mutable references to the inner fields if this is a TableError::ColumnNotFound, otherwise None
Sourcepub fn as_column_not_found(&self) -> Option<&ColId>
pub fn as_column_not_found(&self) -> Option<&ColId>
Optionally returns references to the inner fields if this is a TableError::ColumnNotFound, otherwise None
Sourcepub fn into_column_not_found(self) -> Result<ColId, Self>
pub fn into_column_not_found(self) -> Result<ColId, Self>
Returns the inner fields if this is a TableError::ColumnNotFound, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_decode_field(&self) -> bool
pub fn is_decode_field(&self) -> bool
Returns true if this is a TableError::DecodeField, otherwise false
Sourcepub fn as_decode_field_mut(
&mut self,
) -> Option<(&mut String, &mut Box<str>, &mut String, &mut String)>
pub fn as_decode_field_mut( &mut self, ) -> Option<(&mut String, &mut Box<str>, &mut String, &mut String)>
Optionally returns mutable references to the inner fields if this is a TableError::DecodeField, otherwise None
Sourcepub fn as_decode_field(&self) -> Option<(&String, &Box<str>, &String, &String)>
pub fn as_decode_field(&self) -> Option<(&String, &Box<str>, &String, &String)>
Optionally returns references to the inner fields if this is a TableError::DecodeField, otherwise None
Sourcepub fn into_decode_field(
self,
) -> Result<(String, Box<str>, String, String), Self>
pub fn into_decode_field( self, ) -> Result<(String, Box<str>, String, String), Self>
Returns the inner fields if this is a TableError::DecodeField, 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 TableError::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 TableError::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 TableError::Bflatn, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_duplicate(&self) -> bool
pub fn is_duplicate(&self) -> bool
Returns true if this is a TableError::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 TableError::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 TableError::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 TableError::Duplicate, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_read_col_type_error(&self) -> bool
pub fn is_read_col_type_error(&self) -> bool
Returns true if this is a TableError::ReadColTypeError, otherwise false
Sourcepub fn as_read_col_type_error_mut(&mut self) -> Option<&mut TypeError>
pub fn as_read_col_type_error_mut(&mut self) -> Option<&mut TypeError>
Optionally returns mutable references to the inner fields if this is a TableError::ReadColTypeError, otherwise None
Sourcepub fn as_read_col_type_error(&self) -> Option<&TypeError>
pub fn as_read_col_type_error(&self) -> Option<&TypeError>
Optionally returns references to the inner fields if this is a TableError::ReadColTypeError, otherwise None
Sourcepub fn into_read_col_type_error(self) -> Result<TypeError, Self>
pub fn into_read_col_type_error(self) -> Result<TypeError, Self>
Returns the inner fields if this is a TableError::ReadColTypeError, otherwise returns back the enum in the Err case of the result
Trait Implementations§
Source§impl Debug for TableError
impl Debug for TableError
Source§impl Display for TableError
impl Display for TableError
Source§impl Error for TableError
impl Error for TableError
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 TableError
impl From<DuplicateError> for TableError
Source§fn from(source: DuplicateError) -> Self
fn from(source: DuplicateError) -> Self
Source§impl From<Error> for TableError
impl From<Error> for TableError
Source§impl From<TableError> for DatastoreError
impl From<TableError> for DatastoreError
Source§fn from(source: TableError) -> Self
fn from(source: TableError) -> Self
Auto Trait Implementations§
impl Freeze for TableError
impl RefUnwindSafe for TableError
impl Send for TableError
impl Sync for TableError
impl Unpin for TableError
impl UnwindSafe for TableError
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoAnyhow for T
impl<T> IntoAnyhow for T
Source§fn into_anyhow(self) -> Error
fn into_anyhow(self) -> Error
self into an anyhow::Error.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