pub struct ConnectionRequired {
pub provider: String,
pub subject: Option<ConnectionRequiredSubject>,
pub setup_url: Option<String>,
}Expand description
Structured details for a connection-required tool result.
Provider-only values retain their historical string wire shape. Values with a subject and setup URL use an object so callers can distinguish who must act.
Fields§
§provider: StringConnection provider id.
subject: Option<ConnectionRequiredSubject>Whose grant is missing. Absent on provider-only legacy values.
setup_url: Option<String>Relative UI route where the missing grant can be configured.
Implementations§
Source§impl ConnectionRequired
impl ConnectionRequired
Sourcepub fn provider_only(provider: impl Into<String>) -> Self
pub fn provider_only(provider: impl Into<String>) -> Self
Construct the provider-only shape used by existing tool integrations.
Sourcepub fn with_setup(
provider: impl Into<String>,
subject: ConnectionRequiredSubject,
setup_url: impl Into<String>,
) -> Self
pub fn with_setup( provider: impl Into<String>, subject: ConnectionRequiredSubject, setup_url: impl Into<String>, ) -> Self
Construct a connection requirement with an explicit subject and setup route.
Trait Implementations§
Source§impl Clone for ConnectionRequired
impl Clone for ConnectionRequired
Source§impl Debug for ConnectionRequired
impl Debug for ConnectionRequired
Source§impl<'de> Deserialize<'de> for ConnectionRequired
impl<'de> Deserialize<'de> for ConnectionRequired
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 ConnectionRequired
Source§impl From<&str> for ConnectionRequired
impl From<&str> for ConnectionRequired
Source§impl From<String> for ConnectionRequired
impl From<String> for ConnectionRequired
Source§impl PartialEq for ConnectionRequired
impl PartialEq for ConnectionRequired
Source§impl Serialize for ConnectionRequired
Preserve the historical string wire shape until structured details are present.
impl Serialize for ConnectionRequired
Preserve the historical string wire shape until structured details are present.
impl StructuralPartialEq for ConnectionRequired
Auto Trait Implementations§
impl Freeze for ConnectionRequired
impl RefUnwindSafe for ConnectionRequired
impl Send for ConnectionRequired
impl Sync for ConnectionRequired
impl Unpin for ConnectionRequired
impl UnsafeUnpin for ConnectionRequired
impl UnwindSafe for ConnectionRequired
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