pub enum OwnershipValidationError {
OnBehalfOfNotUser(PrincipalKind),
SubjectForm(SubjectFormError),
}Expand description
Why a NewOwnership failed to validate before reaching the store.
The SQL CHECK constraints are the same invariants enforced at the DB level — this enum is the Rust-side guard so a misconfigured insert never makes a round-trip to the database to be rejected.
Variants§
OnBehalfOfNotUser(PrincipalKind)
on_behalf_of, when set, must be a user principal — services never
appear here.
SubjectForm(SubjectFormError)
A subject given as loose fields (a request body) with both forms or neither.
Trait Implementations§
Source§impl Clone for OwnershipValidationError
impl Clone for OwnershipValidationError
Source§impl Debug for OwnershipValidationError
impl Debug for OwnershipValidationError
Source§impl Display for OwnershipValidationError
impl Display for OwnershipValidationError
impl Eq for OwnershipValidationError
Source§impl Error for OwnershipValidationError
impl Error for OwnershipValidationError
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<SubjectFormError> for OwnershipValidationError
impl From<SubjectFormError> for OwnershipValidationError
Source§fn from(source: SubjectFormError) -> Self
fn from(source: SubjectFormError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for OwnershipValidationError
impl PartialEq for OwnershipValidationError
impl StructuralPartialEq for OwnershipValidationError
Auto Trait Implementations§
impl Freeze for OwnershipValidationError
impl RefUnwindSafe for OwnershipValidationError
impl Send for OwnershipValidationError
impl Sync for OwnershipValidationError
impl Unpin for OwnershipValidationError
impl UnsafeUnpin for OwnershipValidationError
impl UnwindSafe for OwnershipValidationError
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