pub enum Error {
Store(Error),
Io {
what: String,
path: PathBuf,
source: Error,
},
Json(Error),
RepoNotFound {
message: String,
candidates: Vec<String>,
},
AdapterSpawn {
command: String,
message: String,
},
AdapterExited {
command: String,
},
AdapterHandshake {
command: String,
line: String,
},
AdapterError {
method: String,
message: String,
},
Unsupported(String),
WriterLockTimeout {
lock_path: PathBuf,
holder_pid: Option<i64>,
},
Other(String),
}Expand description
Everything that can go wrong around a sync.
Variants§
Store(Error)
The store refused (SQLite, a bad timestamp, …).
Io
A filesystem operation failed.
Json(Error)
A JSON column or protocol line did not parse.
RepoNotFound
spec/sync §1: no repo matched; candidates are the slugs that exist.
AdapterSpawn
§5: the adapter could not be spawned.
AdapterExited
§5: the adapter exited before answering.
AdapterHandshake
§5: the handshake was missing, unparsable or not protocol 1.
AdapterError
§5: the adapter answered a request with {"error": …}.
Unsupported(String)
A method the source’s capabilities do not include (write/remove
without writeThrough, watch without watch).
WriterLockTimeout
§7: the writer lock stayed held past the timeout.
Other(String)
Anything else, with a message.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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<RepoSelection> for Error
impl From<RepoSelection> for Error
Source§fn from(s: RepoSelection) -> Self
fn from(s: RepoSelection) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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