pub struct ApprovalResolution {
pub approval_id: String,
pub invocation_id: String,
pub status: ApprovalStatus,
pub scope: Option<ApprovalScope>,
pub resolved_by: Option<String>,
pub resolved_at: i64,
}Expand description
审批最终解析结果。wait_for_resolution 的返回值。
Fields§
§approval_id: String被解析的审批 id。
invocation_id: String绑定到的 invocation_id(首次创建 approval 时由 decision 关联)。
供 I04 MCP Hub 在 ApprovalScope::Once 下做“仅本次 invocation 放行“校验。
status: ApprovalStatus终态。
scope: Option<ApprovalScope>若 status == Approved,携带用户选择的范围;其它状态下为 None。
resolved_by: Option<String>解析人标识(用户名 / “system” / “auto-expired”)。
resolved_at: i64解析时间(Unix epoch 秒)。
Trait Implementations§
Source§impl Clone for ApprovalResolution
impl Clone for ApprovalResolution
Source§fn clone(&self) -> ApprovalResolution
fn clone(&self) -> ApprovalResolution
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 ApprovalResolution
impl Debug for ApprovalResolution
Source§impl<'de> Deserialize<'de> for ApprovalResolution
impl<'de> Deserialize<'de> for ApprovalResolution
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ApprovalResolution
Source§impl PartialEq for ApprovalResolution
impl PartialEq for ApprovalResolution
Source§fn eq(&self, other: &ApprovalResolution) -> bool
fn eq(&self, other: &ApprovalResolution) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ApprovalResolution
impl Serialize for ApprovalResolution
impl StructuralPartialEq for ApprovalResolution
Auto Trait Implementations§
impl Freeze for ApprovalResolution
impl RefUnwindSafe for ApprovalResolution
impl Send for ApprovalResolution
impl Sync for ApprovalResolution
impl Unpin for ApprovalResolution
impl UnsafeUnpin for ApprovalResolution
impl UnwindSafe for ApprovalResolution
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