pub enum BackendError {
AvailablePort,
PortInUse(u16),
ServerError(ServerError),
AlreadyAProject(PathBuf),
ProjectDirectoryExists(PathBuf),
ReadCurrentDirectory,
CreateGrafbaseDirectory,
WriteSchema,
DeleteDotGrafbaseDirectory(Error),
}Variants
AvailablePort
returned if no port is available. used specifically when searching for ports
PortInUse(u16)
returned if a given port is in use and the search option is not used
ServerError(ServerError)
wraps a server error
AlreadyAProject(PathBuf)
returned when trying to initialize a project that conflicts with an existing project
ProjectDirectoryExists(PathBuf)
returned when trying to initialize a project that conflicts with an existing directory or file
ReadCurrentDirectory
returned if the current directory path cannot be read
CreateGrafbaseDirectory
returned if the grafbase directory cannot be created
WriteSchema
returned if a schema.graphql file cannot be created
DeleteDotGrafbaseDirectory(Error)
returned if the dot grafbase directory cannot be deleted
Trait Implementations
sourceimpl Debug for BackendError
impl Debug for BackendError
sourceimpl Display for BackendError
impl Display for BackendError
sourceimpl Error for BackendError
impl Error for BackendError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
sourceimpl ToExitCode for BackendError
impl ToExitCode for BackendError
sourcefn to_exit_code(&self) -> i32
fn to_exit_code(&self) -> i32
returns the appropriate exit code for a given error
Auto Trait Implementations
impl !RefUnwindSafe for BackendError
impl Send for BackendError
impl Sync for BackendError
impl Unpin for BackendError
impl !UnwindSafe for BackendError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more