pub struct Start {
pub me: SessionUri,
pub reason: StartReason,
pub worker: bool,
}Expand description
POST /v1/start: a new start of the session: a new agent process,
a resume or a /clear (01M3JEE1QQCFS5TMZW5N2DAD2D). Its claims are free
at once. It keeps its ID, its threads and its lead. The call says
why the session starts, and if it is a worker (01M3X9X9M079WGFPJZHNXH9VEP).
use riff_core::wire::{Start, StartReason};
let start: Start = serde_json::from_str(
r#"{"me":"riff://mike@pangolin/o/r?session=a1","reason":"clear","worker":true}"#,
).unwrap();
assert_eq!(start.reason, StartReason::Clear);
assert!(start.worker);Fields§
§me: SessionUri§reason: StartReasonprocess, resume or clear.
worker: boolTrue when the session is a worker: riff workers run started it.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Start
impl<'de> Deserialize<'de> for Start
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 JsonSchema for Start
impl JsonSchema for Start
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for Start
impl RefUnwindSafe for Start
impl Send for Start
impl Sync for Start
impl Unpin for Start
impl UnsafeUnpin for Start
impl UnwindSafe for Start
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