pub enum InternalErrorCodeViolation {
CodeOutOfRange {
value: u16,
},
CategoryNotPermitted {
namespace: &'static str,
category: &'static str,
},
ImpactNotPermitted {
namespace: &'static str,
impact: u16,
},
}Expand description
Internal error code violation with detailed taxonomy information.
SECURITY WARNING: This type contains internal policy details and should NEVER be exposed to external systems or untrusted contexts.
For external error reporting, use .to_public() to get sanitized message.
Variants§
CodeOutOfRange
Code is zero or exceeds 999.
CategoryNotPermitted
Category not permitted for namespace (reveals policy).
ImpactNotPermitted
Impact level not permitted for namespace (reveals authority model).
Implementations§
Source§impl InternalErrorCodeViolation
impl InternalErrorCodeViolation
Sourcepub fn to_public(&self) -> &'static str
pub fn to_public(&self) -> &'static str
Convert to public-safe error message (taxonomy-sanitized).
Returns a generic error string that does not reveal:
- Namespace restrictions
- Category policies
- Authority models
§Use Case
For external APIs, plugin systems, or any untrusted boundary where detailed policy information should not leak.
Trait Implementations§
Source§impl Clone for InternalErrorCodeViolation
impl Clone for InternalErrorCodeViolation
Source§fn clone(&self) -> InternalErrorCodeViolation
fn clone(&self) -> InternalErrorCodeViolation
Returns a duplicate of the value. Read more
1.0.0 · 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 InternalErrorCodeViolation
impl Debug for InternalErrorCodeViolation
Source§impl Display for InternalErrorCodeViolation
impl Display for InternalErrorCodeViolation
Source§impl Error for InternalErrorCodeViolation
impl Error for InternalErrorCodeViolation
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()
impl Eq for InternalErrorCodeViolation
impl StructuralPartialEq for InternalErrorCodeViolation
Auto Trait Implementations§
impl Freeze for InternalErrorCodeViolation
impl RefUnwindSafe for InternalErrorCodeViolation
impl Send for InternalErrorCodeViolation
impl Sync for InternalErrorCodeViolation
impl Unpin for InternalErrorCodeViolation
impl UnwindSafe for InternalErrorCodeViolation
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