pub struct DsError {
pub kind: Box<DsErrorKind>,
}Expand description
The primary error type for YYDS/YYKV.
Fields§
§kind: Box<DsErrorKind>Implementations§
Source§impl DsError
impl DsError
pub fn new(kind: DsErrorKind) -> Self
pub fn io_raw(err: Error, path: Option<PathBuf>) -> Self
pub fn io(details: impl Into<String>) -> Self
pub fn io_str(details: impl Into<String>) -> Self
pub fn storage(details: impl Into<String>) -> Self
pub fn storage_with_op( op: impl Into<String>, details: impl Into<String>, ) -> Self
pub fn corrupted(reason: impl Into<String>) -> Self
pub fn page_full() -> Self
pub fn page_not_found(id: u64) -> Self
pub fn page_size_mismatch(expected: usize, actual: usize) -> Self
pub fn checksum_mismatch(id: u64) -> Self
pub fn invalid_page_type(page_type: u8) -> Self
pub fn serialization(details: impl Into<String>) -> Self
pub fn serialization_with_format( format: impl Into<String>, details: impl Into<String>, ) -> Self
pub fn parse(details: impl Into<String>) -> Self
pub fn parse_with_target( target: impl Into<String>, details: impl Into<String>, ) -> Self
pub fn type_err(expected: impl Into<String>, actual: impl Into<String>) -> Self
pub fn type_conversion(from: impl Into<String>, to: impl Into<String>) -> Self
pub fn query(details: impl Into<String>) -> Self
pub fn query_with_sql( sql: impl Into<String>, details: impl Into<String>, ) -> Self
pub fn execution(details: impl Into<String>) -> Self
pub fn execution_with_op( op: impl Into<String>, details: impl Into<String>, ) -> Self
pub fn schema( table: Option<String>, column: Option<String>, details: impl Into<String>, ) -> Self
pub fn table_not_found(table: impl Into<String>) -> Self
pub fn internal(details: impl Into<String>) -> Self
pub fn protocol(details: impl Into<String>) -> Self
pub fn network(addr: Option<String>, details: impl Into<String>) -> Self
pub fn consensus(op: impl Into<String>, details: impl Into<String>) -> Self
pub fn config(key: impl Into<String>, details: impl Into<String>) -> Self
pub fn http( code: u16, url: impl Into<String>, method: impl Into<String>, ) -> Self
pub fn join(details: impl Into<String>) -> Self
pub fn cache(op: impl Into<String>, details: impl Into<String>) -> Self
pub fn sync(details: impl Into<String>) -> Self
pub fn tenant(id: impl Into<String>, details: impl Into<String>) -> Self
pub fn quota(resource: impl Into<String>, limit: u64, usage: u64) -> Self
pub fn permission( action: impl Into<String>, resource: impl Into<String>, ) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DsError
impl<'de> Deserialize<'de> for DsError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Error for DsError
impl Error for DsError
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<DsErrorKind> for DsError
impl From<DsErrorKind> for DsError
Source§fn from(kind: DsErrorKind) -> Self
fn from(kind: DsErrorKind) -> Self
Converts to this type from the input type.
Source§impl From<FromUtf8Error> for DsError
impl From<FromUtf8Error> for DsError
Source§fn from(e: FromUtf8Error) -> Self
fn from(e: FromUtf8Error) -> Self
Converts to this type from the input type.
Source§impl From<ParseFloatError> for DsError
impl From<ParseFloatError> for DsError
Source§fn from(e: ParseFloatError) -> Self
fn from(e: ParseFloatError) -> Self
Converts to this type from the input type.
Source§impl From<ParseIntError> for DsError
impl From<ParseIntError> for DsError
Source§fn from(e: ParseIntError) -> Self
fn from(e: ParseIntError) -> Self
Converts to this type from the input type.
Source§impl From<SystemTimeError> for DsError
impl From<SystemTimeError> for DsError
Source§fn from(e: SystemTimeError) -> Self
fn from(e: SystemTimeError) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for DsError
Auto Trait Implementations§
impl Freeze for DsError
impl RefUnwindSafe for DsError
impl Send for DsError
impl Sync for DsError
impl Unpin for DsError
impl UnsafeUnpin for DsError
impl UnwindSafe for DsError
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