mirror of
https://github.com/uqbar-dao/nectar.git
synced 2024-11-22 19:34:06 +03:00
vfs clean (#38)
Co-authored-by: hosted-fornet <hosted-fornet@protonmail.com>
This commit is contained in:
parent
13fecc3919
commit
dfa4088669
@ -589,6 +589,7 @@ pub enum VfsAction {
|
||||
full_path: String,
|
||||
offset: u64,
|
||||
},
|
||||
Append(String),
|
||||
SetSize {
|
||||
full_path: String,
|
||||
size: u64,
|
||||
@ -635,20 +636,28 @@ pub enum VfsResponse {
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub enum VfsError {
|
||||
BadJson,
|
||||
BadPayload,
|
||||
BadDriveName,
|
||||
BadDescriptor,
|
||||
NoCap,
|
||||
EntryNotFound,
|
||||
PersistError,
|
||||
InternalError, // String
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
impl VfsError {
|
||||
pub fn kind(&self) -> &str {
|
||||
match *self {
|
||||
VfsError::BadJson => "BadJson",
|
||||
VfsError::BadPayload => "BadPayload",
|
||||
VfsError::BadDriveName => "BadDriveName",
|
||||
VfsError::BadDescriptor => "BadDescriptor",
|
||||
VfsError::NoCap => "NoCap",
|
||||
VfsError::EntryNotFound => "EntryNotFound",
|
||||
VfsError::PersistError => "PersistError",
|
||||
VfsError::InternalError => "InternalError",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
905
src/vfs.rs
905
src/vfs.rs
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user