pub struct PortableDefinition {Show 16 fields
pub uid: String,
pub slug: String,
pub name: String,
pub icon: String,
pub description: String,
pub harness: String,
pub agent_type: String,
pub auto_start: i64,
pub restart_on_crash: i64,
pub idle_timeout_minutes: i64,
pub parent_id: String,
pub branch_label: String,
pub conversation_visibility: String,
pub route: Option<RouteChoice>,
pub seat: Option<AgentSeat>,
pub source_os: String,
}Fields§
§uid: String§slug: String§name: String§icon: String§description: String§harness: StringThe harness (provider): fixed for an agent’s life.
agent_type: String§auto_start: i64§restart_on_crash: i64§idle_timeout_minutes: i64§parent_id: String§branch_label: String§conversation_visibility: String§route: Option<RouteChoice>§seat: Option<AgentSeat>§source_os: StringThe kind of computer it was exported from (windows, linux, macos), for the arrival note: the paths in the
conversation refer to it.
Implementations§
Source§impl PortableDefinition
impl PortableDefinition
Sourcepub fn from_definition(
def: &AgentDefinition,
route: Option<RouteChoice>,
) -> Self
pub fn from_definition( def: &AgentDefinition, route: Option<RouteChoice>, ) -> Self
The portable form of a definition read from the store, with the route its owner chose.
pub fn to_json(&self) -> Result<Vec<u8>, ArchiveError>
Sourcepub fn parse(bytes: &[u8]) -> Result<ParsedDefinition, ArchiveError>
pub fn parse(bytes: &[u8]) -> Result<ParsedDefinition, ArchiveError>
Reads agent.json through the allowlist and checks each carried value.
Trait Implementations§
Source§impl Clone for PortableDefinition
impl Clone for PortableDefinition
Source§fn clone(&self) -> PortableDefinition
fn clone(&self) -> PortableDefinition
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 PortableDefinition
impl Debug for PortableDefinition
Source§impl<'de> Deserialize<'de> for PortableDefinition
impl<'de> Deserialize<'de> for PortableDefinition
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
Source§impl PartialEq for PortableDefinition
impl PartialEq for PortableDefinition
Source§impl Serialize for PortableDefinition
impl Serialize for PortableDefinition
impl StructuralPartialEq for PortableDefinition
Auto Trait Implementations§
impl Freeze for PortableDefinition
impl RefUnwindSafe for PortableDefinition
impl Send for PortableDefinition
impl Sync for PortableDefinition
impl Unpin for PortableDefinition
impl UnsafeUnpin for PortableDefinition
impl UnwindSafe for PortableDefinition
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more