#[non_exhaustive]pub enum UiError {
NotFound(String),
Invalid(&'static str),
CapabilityDenied {
required: &'static str,
},
LedgerError {
reason_code: &'static str,
},
SecretInArgv {
server_id: String,
rule: &'static str,
},
ProfileSerializeFailed,
}Expand description
UI 协议错误。所有变种不得含真实 secret 或原始 SQL / keyring 后端文本。
LedgerError 只承载 AuditError::Display 的结果,AuditError 自身已结构化脱敏。
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NotFound(String)
资源不存在(approval / session / profile / server)
Invalid(&'static str)
输入不合法 —— 稳定字符串 reason,不含 raw 输入
CapabilityDenied
权限不足
LedgerError
Ledger 层错误转译;caller 应看 reason_code 而非原文
SecretInArgv
argv 含硬指纹 secret(D5 fail-closed 入口)
Fields
ProfileSerializeFailed
Sandbox profile JCS 规范化失败
Trait Implementations§
Source§impl Deserialize<'static> for UiError
impl Deserialize<'static> for UiError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'static>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'static>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for UiError
Source§impl Error for UiError
impl Error for UiError
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 StructuralPartialEq for UiError
Auto Trait Implementations§
impl Freeze for UiError
impl RefUnwindSafe for UiError
impl Send for UiError
impl Sync for UiError
impl Unpin for UiError
impl UnsafeUnpin for UiError
impl UnwindSafe for UiError
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