pub struct AgentRef {
pub id: String,
pub agent_type: AgentType,
pub capacity: Option<String>,
pub version: Option<String>,
}Expand description
A reference to a contributing agent. capacity is a role/credential term id (e.g. a professional
registration URI); version pins a software agent or instrument to a specific version/configuration
so result variation is attributable (§10).
Fields§
§id: StringStable identifier for the agent (a DID / URI / registration id). Matched by has_undeclared_ai.
agent_type: AgentType§capacity: Option<String>A role/credential term id evidencing the capacity in which the agent acted, if any.
version: Option<String>Version / configuration for a software agent or instrument (result-affecting, §10).
Implementations§
Source§impl AgentRef
impl AgentRef
Sourcepub fn natural_person(id: impl Into<String>) -> Self
pub fn natural_person(id: impl Into<String>) -> Self
A natural-person agent (bears authorship + responsibility).
Sourcepub fn software_agent(id: impl Into<String>) -> Self
pub fn software_agent(id: impl Into<String>) -> Self
A software agent / AI tool (must be disclosed; never bears liability).
Sourcepub fn new(id: impl Into<String>, agent_type: AgentType) -> Self
pub fn new(id: impl Into<String>, agent_type: AgentType) -> Self
Generic constructor for any agent type.
Sourcepub fn with_capacity(self, capacity: impl Into<String>) -> Self
pub fn with_capacity(self, capacity: impl Into<String>) -> Self
Set the capacity/credential term id (fluent).
Sourcepub fn with_version(self, version: impl Into<String>) -> Self
pub fn with_version(self, version: impl Into<String>) -> Self
Set the version/configuration (fluent).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AgentRef
impl<'de> Deserialize<'de> for AgentRef
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 AgentRef
impl StructuralPartialEq for AgentRef
Auto Trait Implementations§
impl Freeze for AgentRef
impl RefUnwindSafe for AgentRef
impl Send for AgentRef
impl Sync for AgentRef
impl Unpin for AgentRef
impl UnsafeUnpin for AgentRef
impl UnwindSafe for AgentRef
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