Enum TableError

Source
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

Fields

§table_id: TableId
§

RowDecodeError(DecodeError)

§

DuplicateColumnName(String)

§

ColumnNotFound(ColId)

§

DecodeField

Fields

§table: String
§field: Box<str>
§expect: String
§found: String
§

Bflatn(Error)

§

Duplicate(DuplicateError)

§

ReadColTypeError(TypeError)

Implementations§

Source§

impl TableError

Source

pub fn is_system(&self) -> bool

Returns true if this is a TableError::System, otherwise false

Source

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

Source

pub fn as_system(&self) -> Option<&Box<str>>

Optionally returns references to the inner fields if this is a TableError::System, otherwise None

Source

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

Source

pub fn is_exist(&self) -> bool

Returns true if this is a TableError::Exist, otherwise false

Source

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

Source

pub fn as_exist(&self) -> Option<&String>

Optionally returns references to the inner fields if this is a TableError::Exist, otherwise None

Source

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

Source

pub fn is_not_found(&self) -> bool

Returns true if this is a TableError::NotFound, otherwise false

Source

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

Source

pub fn as_not_found(&self) -> Option<&String>

Optionally returns references to the inner fields if this is a TableError::NotFound, otherwise None

Source

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

Source

pub fn is_id_not_found(&self) -> bool

Returns true if this is a TableError::IdNotFound, otherwise false

Source

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

Source

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

Source

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

Source

pub fn is_raw_sql_not_found(&self) -> bool

Returns true if this is a TableError::RawSqlNotFound, otherwise false

Source

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

Source

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

Source

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

Source

pub fn is_id_not_found_state(&self) -> bool

Returns true if this is a TableError::IdNotFoundState, otherwise false

Source

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

Source

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

Source

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

Source

pub fn is_column_without_name(&self) -> bool

Returns true if this is a TableError::ColumnWithoutName, otherwise false

Source

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

Source

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

Source

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

Source

pub fn is_invalid_schema(&self) -> bool

Returns true if this is a TableError::InvalidSchema, otherwise false

Source

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

Source

pub fn as_invalid_schema(&self) -> Option<(&TableId, &LibError)>

Optionally returns references to the inner fields if this is a TableError::InvalidSchema, otherwise None

Source

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

Source

pub fn is_row_invalid_type(&self) -> bool

Returns true if this is a TableError::RowInvalidType, otherwise false

Source

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

Source

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

Source

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

Source

pub fn is_row_decode_error(&self) -> bool

Returns true if this is a TableError::RowDecodeError, otherwise false

Source

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

Source

pub fn as_row_decode_error(&self) -> Option<&DecodeError>

Optionally returns references to the inner fields if this is a TableError::RowDecodeError, otherwise None

Source

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

Source

pub fn is_duplicate_column_name(&self) -> bool

Returns true if this is a TableError::DuplicateColumnName, otherwise false

Source

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

Source

pub fn as_duplicate_column_name(&self) -> Option<&String>

Optionally returns references to the inner fields if this is a TableError::DuplicateColumnName, otherwise None

Source

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

Source

pub fn is_column_not_found(&self) -> bool

Returns true if this is a TableError::ColumnNotFound, otherwise false

Source

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

Source

pub fn as_column_not_found(&self) -> Option<&ColId>

Optionally returns references to the inner fields if this is a TableError::ColumnNotFound, otherwise None

Source

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

Source

pub fn is_decode_field(&self) -> bool

Returns true if this is a TableError::DecodeField, otherwise false

Source

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

Source

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

Source

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

Source

pub fn is_bflatn(&self) -> bool

Returns true if this is a TableError::Bflatn, otherwise false

Source

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

Source

pub fn as_bflatn(&self) -> Option<&Error>

Optionally returns references to the inner fields if this is a TableError::Bflatn, otherwise None

Source

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

Source

pub fn is_duplicate(&self) -> bool

Returns true if this is a TableError::Duplicate, otherwise false

Source

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

Source

pub fn as_duplicate(&self) -> Option<&DuplicateError>

Optionally returns references to the inner fields if this is a TableError::Duplicate, otherwise None

Source

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

Source

pub fn is_read_col_type_error(&self) -> bool

Returns true if this is a TableError::ReadColTypeError, otherwise false

Source

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

Source

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

Source

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

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for TableError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for TableError

Source§

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

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<DuplicateError> for TableError

Source§

fn from(source: DuplicateError) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for TableError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<TableError> for DatastoreError

Source§

fn from(source: TableError) -> Self

Converts to this type from the input type.
Source§

impl From<TypeError> for TableError

Source§

fn from(source: TypeError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoAnyhow for T
where T: Into<Error>,

Source§

fn into_anyhow(self) -> Error

Converts self into an anyhow::Error.
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T