pub enum InvalidPolicyReason {
Malformed(String),
TooLarge(String),
TooDeep(String),
NotUtf8,
}Expand description
Why a located policy document could not be turned into an AclDocument.
Every variant is terminal: the document exists, so the walk must not
continue to an ancestor. Carrying the reason lets a caller distinguish an
operator authoring mistake (Malformed) from a resource-exhaustion guard
firing (TooLarge / TooDeep), which have different operational fixes.
Variants§
Malformed(String)
The body parsed as neither JSON-LD nor Turtle.
TooLarge(String)
The body exceeded the parser’s byte cap (crate::wac::MAX_ACL_BYTES).
TooDeep(String)
The body exceeded the JSON nesting cap
(crate::wac::MAX_ACL_JSON_DEPTH).
NotUtf8
The body is not valid UTF-8, so it can be neither JSON-LD nor Turtle.
Trait Implementations§
Source§impl Clone for InvalidPolicyReason
impl Clone for InvalidPolicyReason
Source§impl Debug for InvalidPolicyReason
impl Debug for InvalidPolicyReason
Source§impl Display for InvalidPolicyReason
impl Display for InvalidPolicyReason
impl Eq for InvalidPolicyReason
Source§impl PartialEq for InvalidPolicyReason
impl PartialEq for InvalidPolicyReason
impl StructuralPartialEq for InvalidPolicyReason
Auto Trait Implementations§
impl Freeze for InvalidPolicyReason
impl RefUnwindSafe for InvalidPolicyReason
impl Send for InvalidPolicyReason
impl Sync for InvalidPolicyReason
impl Unpin for InvalidPolicyReason
impl UnsafeUnpin for InvalidPolicyReason
impl UnwindSafe for InvalidPolicyReason
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