mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-27 00:31:02 +00:00
squash-me
This commit is contained in:
20
meilisearch-schema/src/error.rs
Normal file
20
meilisearch-schema/src/error.rs
Normal file
@ -0,0 +1,20 @@
|
||||
|
||||
use std::{error, fmt};
|
||||
|
||||
pub type SResult<T> = Result<T, Error>;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum Error {
|
||||
MaxFieldsLimitExceeded,
|
||||
}
|
||||
|
||||
impl fmt::Display for Error {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
use self::Error::*;
|
||||
match self {
|
||||
MaxFieldsLimitExceeded => write!(f, "The maximum of possible reatributed field id has been reached"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl error::Error for Error {}
|
Reference in New Issue
Block a user