pub enum ValidationError {
InvalidCollectionName(String),
InvalidKeyName(String),
InvalidFieldName(String),
CollectionNameTooLong,
KeyNameTooLong,
PayloadTooLarge,
InvalidJsonDepth,
TooManyKeys,
UnknownProperty(String),
}Expand description
All possible validation failures. Each variant carries enough context to produce a helpful error message for the client.
Variants§
InvalidCollectionName(String)
The collection name contains invalid characters or is a reserved name.
InvalidKeyName(String)
The document key contains invalid characters or is too long.
InvalidFieldName(String)
A field name in a projection, WHERE clause, or join contains invalid characters.
CollectionNameTooLong
The collection name exceeds 64 characters.
KeyNameTooLong
A document key exceeds 256 characters.
PayloadTooLarge
The entire request payload exceeds 10 MB.
InvalidJsonDepth
The JSON object is nested more than 32 levels deep.
TooManyKeys
A single request contains more than 1000 keys.
UnknownProperty(String)
The request payload contains a property that is not recognised for this endpoint.
Trait Implementations§
Source§impl Debug for ValidationError
impl Debug for ValidationError
Source§impl Display for ValidationError
Implement Display so ValidationError can be returned as a JSON error message.
impl Display for ValidationError
Implement Display so ValidationError can be returned as a JSON error message.
Source§impl Error for ValidationError
Mark ValidationError as a standard Rust error type.
Required for it to be used with the ? operator in functions returning
Result<_, Box<dyn std::error::Error>>.
impl Error for ValidationError
Mark ValidationError as a standard Rust error type.
Required for it to be used with the ? operator in functions returning
Result<_, Box<dyn std::error::Error>>.
1.30.0 · 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 Freeze for ValidationError
impl RefUnwindSafe for ValidationError
impl Send for ValidationError
impl Sync for ValidationError
impl Unpin for ValidationError
impl UnsafeUnpin for ValidationError
impl UnwindSafe for ValidationError
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.