pub enum OwnershipValidationError {
GrantedByNotService(PrincipalKind),
OnBehalfOfNotUser(PrincipalKind),
}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§
GrantedByNotService(PrincipalKind)
granted_by must be a service principal — humans never appear in
this column.
OnBehalfOfNotUser(PrincipalKind)
on_behalf_of, when set, must be a user principal — services never
appear here.
Trait Implementations§
Source§impl Clone for OwnershipValidationError
impl Clone for OwnershipValidationError
Source§fn clone(&self) -> OwnershipValidationError
fn clone(&self) -> OwnershipValidationError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§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
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 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