123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- use std::fmt::Debug;
- pub enum GetKeyError {
- KeyNotExists,
- InternalError(String)
- }
- impl Debug for GetKeyError {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- match self {
- GetKeyError::KeyNotExists => write!(f, "KeyNotExists"),
- GetKeyError::InternalError(v) => write!(f, "InternalError: {}", v),
- }
- }
- }
- pub enum MountError {
- InvalidAfsHandle,
- InternalError(String),
- MountPointAlreadyMounted,
- }
- impl Debug for MountError {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- match self {
- MountError::InvalidAfsHandle => write!(f, "InvalidAfsHandle"),
- MountError::InternalError(v) => write!(f, "InternalError: {}", v),
- MountError::MountPointAlreadyMounted => write!(f, "MountPointAlreadyMounted"),
- }
- }
- }
- pub enum AfsFreeError {
- InvalidAfsHandle,
- InternalError(String),
- }
- impl Debug for AfsFreeError {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- match self {
- AfsFreeError::InvalidAfsHandle => write!(f, "InvalidAfsHandle"),
- AfsFreeError::InternalError(v) => write!(f, "InternalError: {}", v),
- }
- }
- }
- pub enum MkdirError {
- InternalError(String),
- }
- impl Debug for MkdirError {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- match self {
- MkdirError::InternalError(v) => write!(f, "InternalError: {}", v),
- }
- }
- }
- pub enum AfsMkdirError {
- InvalidAfsHandle,
- InternalError(String),
- }
- impl Debug for AfsMkdirError {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- match self {
- AfsMkdirError::InvalidAfsHandle => write!(f, "InvalidAfsHandle"),
- AfsMkdirError::InternalError(v) => write!(f, "InternalError: {}", v),
- }
- }
- }
- pub enum CreateBepOvfsError {
- CreateAfsInstanceFailed,
- MemeoryReadOutOfBounds,
- EmptyFsLayerArray,
- InvalidArrayElementLength,
- InvalidHandle,
- UnknownError(i32),
- }
- impl Debug for CreateBepOvfsError {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- match self {
- CreateBepOvfsError::CreateAfsInstanceFailed => write!(f, "CreateAfsInstanceFailed"),
- CreateBepOvfsError::MemeoryReadOutOfBounds => write!(f, "MemeoryReadOutOfBounds"),
- CreateBepOvfsError::EmptyFsLayerArray => write!(f, "EmptyFsLayerArray"),
- CreateBepOvfsError::InvalidArrayElementLength => write!(f, "InvalidArrayElementLength"),
- CreateBepOvfsError::InvalidHandle => write!(f, "InvalidHandle"),
- CreateBepOvfsError::UnknownError(ec) => write!(f, "UnknownError: code={}", ec),
- }
- }
- }
|