#[derive(Debug)]
pub enum Error {
NotFound,
TooManyObjects,
TooLargeSize,
InstanceNotSet,
}
#[derive(Debug)]
pub struct ResourceNotFound;
impl From<ResourceNotFound> for Error {
fn from(_: ResourceNotFound) -> Self {
Self::NotFound
}
}
#[derive(Debug)]
pub struct TooManySources;
impl From<TooManySources> for Error {
fn from(_: TooManySources) -> Self {
Self::TooManyObjects
}
}
#[derive(Debug)]
pub struct SourceNotFound;
impl From<SourceNotFound> for Error {
fn from(_: SourceNotFound) -> Self {
Self::NotFound
}
}
#[derive(Debug)]
pub struct TooManySpaces;
impl From<TooManySpaces> for Error {
fn from(_: TooManySpaces) -> Self {
Self::TooManyObjects
}
}
#[derive(Debug)]
pub struct SpaceNotFound;
impl From<SpaceNotFound> for Error {
fn from(_: SpaceNotFound) -> Self {
Self::NotFound
}
}
#[derive(Debug)]
pub struct TooLargeSize;
impl From<TooLargeSize> for Error {
fn from(_: TooLargeSize) -> Self {
Self::TooLargeSize
}
}