pub enum BackendError {
Show 24 variants
AvailablePort,
PortInUse(u16),
ServerError(ServerError),
AlreadyAProject(PathBuf),
ProjectDirectoryExists(PathBuf),
ReadCurrentDirectory,
CreateGrafbaseDirectory(Error),
CreateProjectDirectory(Error),
WriteSchema(Error),
WriteEnvFile(Error),
DeleteDatabaseDirectory(Error),
DeleteGrafbaseDirectory(Error),
UnsupportedTemplateURL(String),
MalformedTemplateURL(String),
StartDownloadRepoArchive(String, Error),
DownloadRepoArchive(String),
TemplateNotFound,
MoveExtractedFiles(Error),
ReadArchiveEntries,
ExtractArchiveEntry(Error),
CleanExtractedFiles(Error),
StartGetRepositoryInformation(String),
GetRepositoryInformation(String),
ReadRepositoryInformation(String),
}
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 could not be read
CreateGrafbaseDirectory(Error)
returned if the grafbase directory could not be created
CreateProjectDirectory(Error)
returned if the project directory could not be created
WriteSchema(Error)
returned if a schema.graphql file could not be created
WriteEnvFile(Error)
returned if a .env file could not be created
DeleteDatabaseDirectory(Error)
returned if .grafbase/database could not be deleted
DeleteGrafbaseDirectory(Error)
returned if the grafbase directory for the project could not be deleted
UnsupportedTemplateURL(String)
returned if a template URL is not supported
MalformedTemplateURL(String)
returned if a template URL could not be parsed
StartDownloadRepoArchive(String, Error)
returned if a repo tar could not be downloaded (on a non 200-299 status)
DownloadRepoArchive(String)
returned if a repo tar could not be downloaded
TemplateNotFound
returned if no files matching the template path were extracted (excluding extraction errors)
MoveExtractedFiles(Error)
returned if the extracted files from the template repository could not be moved
ReadArchiveEntries
returned if the entries of the template repository archive could not be read
ExtractArchiveEntry(Error)
returned if one of the entries of the template repository archive could not be extracted
CleanExtractedFiles(Error)
returned if the files extracted from the template repository archive could not be cleaned
StartGetRepositoryInformation(String)
returned if the request to get the information for a repository could not be sent
GetRepositoryInformation(String)
returned if the request to get the information for a repository returned a non 200-299 status
ReadRepositoryInformation(String)
returned if the request to get the information for a repository returned a response that could not be parsed
Trait Implementations§
Source§impl Debug for BackendError
impl Debug for BackendError
Source§impl Display for BackendError
impl Display for BackendError
Source§impl Error for BackendError
impl Error for BackendError
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
Auto Trait Implementations§
impl Freeze for BackendError
impl !RefUnwindSafe for BackendError
impl Send for BackendError
impl Sync for BackendError
impl Unpin for BackendError
impl !UnwindSafe for BackendError
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for 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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more