pub struct FieldIssue {
pub field: String,
pub code: String,
pub reason: String,
}Expand description
One field (or whole-model) invariant that failed.
The text field is reason so UniFFI Kotlin exceptions never collide with
Throwable.message.
Fields§
§field: StringJSON / MessagePack key, or "body" for a whole-object failure.
code: StringStable machine code (INVALID_EMAIL, STRING_TOO_LONG, …).
reason: StringHuman-readable explanation.
Implementations§
Trait Implementations§
Source§impl<R: ?Sized + Sync, S> AsyncValidate<R, S> for FieldIssue
impl<R: ?Sized + Sync, S> AsyncValidate<R, S> for FieldIssue
fn validate_async_with<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_ctx: &'life1 ValidationContext,
_resolver: &'life2 R,
) -> Pin<Box<dyn Future<Output = Result<(), AsyncValidationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn validate_async<'life0, 'life1, 'async_trait>(
&'life0 self,
resolver: &'life1 R,
) -> Pin<Box<dyn Future<Output = Result<(), AsyncValidationError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§impl Clone for FieldIssue
impl Clone for FieldIssue
Source§impl Debug for FieldIssue
impl Debug for FieldIssue
Source§impl<'de> Deserialize<'de> for FieldIssue
impl<'de> Deserialize<'de> for FieldIssue
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for FieldIssue
impl Display for FieldIssue
impl Eq for FieldIssue
Source§impl Error for FieldIssue
impl Error for FieldIssue
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<FieldIssue> for AsyncValidationError
impl From<FieldIssue> for AsyncValidationError
Source§fn from(issue: FieldIssue) -> Self
fn from(issue: FieldIssue) -> Self
Converts to this type from the input type.
Source§impl IntoAsyncError for FieldIssue
impl IntoAsyncError for FieldIssue
fn into_async_error_result(self, field: &str, _code: &str) -> AsyncCheckResult
Source§impl IntoSyncError for FieldIssue
impl IntoSyncError for FieldIssue
fn into_sync_issues(self, field: &str, _code: &str) -> Vec<FieldIssue>
Source§impl PartialEq for FieldIssue
impl PartialEq for FieldIssue
Source§impl<S> ScopedValidate<S> for FieldIssue
impl<S> ScopedValidate<S> for FieldIssue
fn validate_scoped_with( &self, _ctx: &ValidationContext, ) -> Result<(), Vec<FieldIssue>>
fn validate_scoped(&self) -> Result<(), Vec<FieldIssue>>
Source§impl Serialize for FieldIssue
impl Serialize for FieldIssue
impl StructuralPartialEq for FieldIssue
Source§impl Validate for FieldIssue
impl Validate for FieldIssue
fn validate_with(&self, _ctx: &ValidationContext) -> Result<(), Vec<FieldIssue>>
fn validate(&self) -> Result<(), Vec<FieldIssue>>
Auto Trait Implementations§
impl Forget for FieldIssue
impl Freeze for FieldIssue
impl Move for FieldIssue
impl RefUnwindSafe for FieldIssue
impl Send for FieldIssuewhere
RawVecInner: Send,
impl Sync for FieldIssuewhere
RawVecInner: Sync,
impl Unpin for FieldIssue
impl UnsafeUnpin for FieldIssue
impl UnwindSafe for FieldIssuewhere
RawVecInner: UnwindSafe,
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
Mutably borrows from an owned value. Read more