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) -> DsError
pub fn io_raw(err: Error, path: Option<PathBuf>) -> DsError
pub fn io(details: impl Into<String>) -> DsError
pub fn io_str(details: impl Into<String>) -> DsError
pub fn storage(details: impl Into<String>) -> DsError
pub fn storage_with_op( op: impl Into<String>, details: impl Into<String>, ) -> DsError
pub fn corrupted(reason: impl Into<String>) -> DsError
pub fn page_full() -> DsError
pub fn page_not_found(id: u64) -> DsError
pub fn page_size_mismatch(expected: usize, actual: usize) -> DsError
pub fn checksum_mismatch(id: u64) -> DsError
pub fn invalid_page_type(page_type: u8) -> DsError
pub fn serialization(details: impl Into<String>) -> DsError
pub fn serialization_with_format( format: impl Into<String>, details: impl Into<String>, ) -> DsError
pub fn parse(details: impl Into<String>) -> DsError
pub fn parse_with_target( target: impl Into<String>, details: impl Into<String>, ) -> DsError
pub fn type_err( expected: impl Into<String>, actual: impl Into<String>, ) -> DsError
pub fn type_conversion( from: impl Into<String>, to: impl Into<String>, ) -> DsError
pub fn query(details: impl Into<String>) -> DsError
pub fn query_with_sql( sql: impl Into<String>, details: impl Into<String>, ) -> DsError
pub fn execution(details: impl Into<String>) -> DsError
pub fn execution_with_op( op: impl Into<String>, details: impl Into<String>, ) -> DsError
pub fn schema( table: Option<String>, column: Option<String>, details: impl Into<String>, ) -> DsError
pub fn table_not_found(table: impl Into<String>) -> DsError
pub fn internal(details: impl Into<String>) -> DsError
pub fn protocol(details: impl Into<String>) -> DsError
pub fn network(addr: Option<String>, details: impl Into<String>) -> DsError
pub fn consensus(op: impl Into<String>, details: impl Into<String>) -> DsError
pub fn config(key: impl Into<String>, details: impl Into<String>) -> DsError
pub fn http( code: u16, url: impl Into<String>, method: impl Into<String>, ) -> DsError
pub fn join(details: impl Into<String>) -> DsError
pub fn cache(op: impl Into<String>, details: impl Into<String>) -> DsError
pub fn sync(details: impl Into<String>) -> DsError
pub fn tenant(id: impl Into<String>, details: impl Into<String>) -> DsError
pub fn quota(resource: impl Into<String>, limit: u64, usage: u64) -> DsError
pub fn permission( action: impl Into<String>, resource: impl Into<String>, ) -> DsError
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DsError
impl<'de> Deserialize<'de> for DsError
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DsError, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DsError, <__D as Deserializer<'de>>::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) -> DsError
fn from(kind: DsErrorKind) -> DsError
Converts to this type from the input type.
Source§impl From<FromUtf8Error> for DsError
impl From<FromUtf8Error> for DsError
Source§fn from(e: FromUtf8Error) -> DsError
fn from(e: FromUtf8Error) -> DsError
Converts to this type from the input type.
Source§impl From<ParseFloatError> for DsError
impl From<ParseFloatError> for DsError
Source§fn from(e: ParseFloatError) -> DsError
fn from(e: ParseFloatError) -> DsError
Converts to this type from the input type.
Source§impl From<ParseIntError> for DsError
impl From<ParseIntError> for DsError
Source§fn from(e: ParseIntError) -> DsError
fn from(e: ParseIntError) -> DsError
Converts to this type from the input type.
Source§impl From<SystemTimeError> for DsError
impl From<SystemTimeError> for DsError
Source§fn from(e: SystemTimeError) -> DsError
fn from(e: SystemTimeError) -> DsError
Converts to this type from the input type.
Source§impl Serialize for DsError
impl Serialize for DsError
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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