pub struct ToolSource {
pub namespace: ToolNamespace,
pub raw_name: String,
pub display_name: String,
pub trust: ToolTrustLevel,
pub metadata: RunMetadata,
}Expand description
Host-facing metadata describing where a provider-visible tool came from.
Fields§
§namespace: ToolNamespaceSource namespace.
raw_name: StringRaw source name before provider-facing disambiguation.
display_name: StringProvider-facing display name registered in ToolRegistry.
trust: ToolTrustLevelSource trust level.
metadata: RunMetadataHost/application metadata.
Implementations§
Source§impl ToolSource
impl ToolSource
Sourcepub fn new(
namespace: ToolNamespace,
raw_name: impl Into<String>,
display_name: impl Into<String>,
) -> Self
pub fn new( namespace: ToolNamespace, raw_name: impl Into<String>, display_name: impl Into<String>, ) -> Self
Constructs source metadata with external trust by default.
Sourcepub fn local(name: impl Into<String>) -> Self
pub fn local(name: impl Into<String>) -> Self
Constructs source metadata for a local application tool.
Sourcepub fn with_trust(self, trust: ToolTrustLevel) -> Self
pub fn with_trust(self, trust: ToolTrustLevel) -> Self
Sets the trust level.
Sourcepub fn with_metadata(self, metadata: RunMetadata) -> Self
pub fn with_metadata(self, metadata: RunMetadata) -> Self
Sets source metadata.
Trait Implementations§
Source§impl Clone for ToolSource
impl Clone for ToolSource
Source§fn clone(&self) -> ToolSource
fn clone(&self) -> ToolSource
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 ToolSource
impl Debug for ToolSource
Source§impl<'de> Deserialize<'de> for ToolSource
impl<'de> Deserialize<'de> for ToolSource
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 ToolSource
Source§impl PartialEq for ToolSource
impl PartialEq for ToolSource
Source§impl Serialize for ToolSource
impl Serialize for ToolSource
impl StructuralPartialEq for ToolSource
Auto Trait Implementations§
impl Freeze for ToolSource
impl RefUnwindSafe for ToolSource
impl Send for ToolSource
impl Sync for ToolSource
impl Unpin for ToolSource
impl UnsafeUnpin for ToolSource
impl UnwindSafe for ToolSource
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