pub enum Error {
Io {
path: PathBuf,
source: Error,
},
ConfigToml(Error),
ConfigTomlSerialize(Error),
Json(Error),
Sexp(SexpError),
Google(String),
MultipleTabs,
OrgParse(String),
NotLinked,
PathResolution(String),
Auth(String),
}Expand description
Errors raised by org-gdocs library code.
Variants§
Io
A filesystem operation failed for the given path.
ConfigToml(Error)
The configuration file could not be parsed as TOML.
ConfigTomlSerialize(Error)
The configuration could not be serialized to TOML.
Json(Error)
A JSON value could not be (de)serialized.
JSON is confined to the forced external boundaries (the Google API wire
format and OAuth credential/token files, OVR-1/A5); surfaces this crate
owns use s-expressions and surface Error::Sexp instead.
Sexp(SexpError)
An s-expression (the ** Sync State block or the CLI↔Emacs envelope, A5)
could not be parsed or did not match the expected shape.
Google(String)
A Google Docs or Drive API call failed — transport, protocol, or a non-success API response.
The generated client’s error type is mapped to its display string at the
single seam in crate::google::client (F6) so it never leaks into this
crate’s public surface (EI-1).
MultipleTabs
The target document exposes more than one tab, which is unsupported.
We operate only on the first/legacy tab (DI-6); a multi-tab document is reported rather than silently mis-indexed.
OrgParse(String)
The org body could not be parsed by tftio-kb.
NotLinked
The org file has no linked Google Doc (#+GDOC_ID:).
pull, clean, and open all require a document to have been created by
a prior push; this is the branchable failure they surface when it has not.
PathResolution(String)
A required path could not be resolved (e.g. no home/config directory).
Auth(String)
OAuth authentication, token acquisition, or TLS setup failed.
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.