pub struct SetStep {
pub me: SessionUri,
pub change: StepChange,
}Expand description
POST /v1/step: a change of the long step of me
(01M48VDGTD40P8RBZMS0XB5M9N). It is a signal, and a sign of life.
riff step fail also wakes the lead (01M48VDS663X064YS5ZGCCZSTB).
use riff_core::wire::{SetStep, StepChange};
let me: riff_core::name::SessionUri = "riff://mike@pangolin/o/r?session=a1".parse()?;
let set = |change| SetStep { me: me.clone(), change };
assert!(set(StepChange::Start { name: "live window".into() }).check().is_ok());
assert!(set(StepChange::Done).check().is_ok());
assert_eq!(
set(StepChange::Fail { reason: " ".into() }).check().unwrap_err(),
"the reason is empty"
);
assert_eq!(
set(StepChange::Start { name: "a\nb".into() }).check().unwrap_err(),
"the name must be one line"
);Fields§
§me: SessionUri§change: StepChangeImplementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SetStep
impl<'de> Deserialize<'de> for SetStep
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 SetStep
impl JsonSchema for SetStep
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 SetStep
impl RefUnwindSafe for SetStep
impl Send for SetStep
impl Sync for SetStep
impl Unpin for SetStep
impl UnsafeUnpin for SetStep
impl UnwindSafe for SetStep
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