pub struct SetBlocked {
pub me: SessionUri,
pub reason: String,
}Expand description
POST /v1/blocked: me cannot go on with no decision
(01M41FZPGEK4TNPSM2051W4VMS). It is a signal. The blocked tool and
riff blocked send it with the message that wakes the lead, in one
command: a session does neither alone.
use riff_core::wire::SetBlocked;
let me: riff_core::name::SessionUri = "riff://mike@pangolin/o/r?session=a1".parse()?;
let set = |reason: &str| SetBlocked { me: me.clone(), reason: reason.into() };
assert!(set("which of the two designs?").check().is_ok());
assert_eq!(set(" ").check().unwrap_err(), "the reason is empty");Fields§
§me: SessionUri§reason: StringImplementations§
Source§impl SetBlocked
impl SetBlocked
Trait Implementations§
Source§impl Call for SetBlocked
impl Call for SetBlocked
Source§impl Clone for SetBlocked
impl Clone for SetBlocked
Source§fn clone(&self) -> SetBlocked
fn clone(&self) -> SetBlocked
Returns a duplicate of the value. Read more
1.0.0 · 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 SetBlocked
impl Debug for SetBlocked
Source§impl<'de> Deserialize<'de> for SetBlocked
impl<'de> Deserialize<'de> for SetBlocked
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 SetBlocked
impl JsonSchema for SetBlocked
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 SetBlocked
impl RefUnwindSafe for SetBlocked
impl Send for SetBlocked
impl Sync for SetBlocked
impl Unpin for SetBlocked
impl UnsafeUnpin for SetBlocked
impl UnwindSafe for SetBlocked
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