pub struct AgentContribution {
pub schema: String,
pub id: String,
pub kind: String,
pub title: Option<String>,
pub placement: Option<Value>,
pub data: Value,
pub source: PathBuf,
}Expand description
A portable, inert contribution a frontend may choose to render.
Unknown kind values remain available to newer frontends and are ignored
by older ones. placement and data are declarative JSON; loading a
contribution never evaluates code or imports a module.
Fields§
§schema: StringMust be CONTRIBUTION_SCHEMA.
id: StringStable package-scoped contribution id.
kind: StringHost-neutral kind such as panel, tool-result, action, or status.
title: Option<String>Optional display title.
placement: Option<Value>Frontend-neutral placement hints.
data: ValueKind-specific inert data interpreted by the rendering host.
source: PathBufCanonical JSON source file, supplied by the loader.
Trait Implementations§
Source§impl Clone for AgentContribution
impl Clone for AgentContribution
Source§fn clone(&self) -> AgentContribution
fn clone(&self) -> AgentContribution
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 AgentContribution
impl Debug for AgentContribution
Source§impl<'de> Deserialize<'de> for AgentContribution
impl<'de> Deserialize<'de> for AgentContribution
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AgentContribution, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AgentContribution, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for AgentContribution
impl PartialEq for AgentContribution
Source§impl Serialize for AgentContribution
impl Serialize for AgentContribution
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for AgentContribution
Auto Trait Implementations§
impl Freeze for AgentContribution
impl RefUnwindSafe for AgentContribution
impl Send for AgentContribution
impl Sync for AgentContribution
impl Unpin for AgentContribution
impl UnsafeUnpin for AgentContribution
impl UnwindSafe for AgentContribution
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