pub struct SetMachine {
pub me: SessionUri,
pub numbers: String,
}Expand description
POST /v1/machine: the numbers of the machine of me
(01M515KSWVGCBS76AWZV74TJQ3). The riff mcp of the lead sends them
for its machine, which has no riff workers host. The numbers are
the text of the status of a workers host. The daemon of a host sends
its facts in the same way (01M57D3F50347RD8ED79KEA9V7). riff-server
keeps the text and does not read it. It is a signal, like a status.
use riff_core::wire::SetMachine;
let me: riff_core::name::SessionUri = "riff://mike@pangolin/o/r?session=a1".parse()?;
let set = |numbers: &str| SetMachine { me: me.clone(), numbers: numbers.into() };
assert!(set("workers host: limit 2, floor 4GB, no workers").check().is_ok());
assert_eq!(set(" ").check().unwrap_err(), "the text of the numbers is empty");
assert!(set(&"x".repeat(4000)).check().is_ok());
assert!(set(&"x".repeat(4001)).check().is_err());
assert!(set("two\nlines").check().is_err());Fields§
§me: SessionUri§numbers: StringImplementations§
Source§impl SetMachine
impl SetMachine
Trait Implementations§
Source§impl Call for SetMachine
impl Call for SetMachine
Source§impl Clone for SetMachine
impl Clone for SetMachine
Source§fn clone(&self) -> SetMachine
fn clone(&self) -> SetMachine
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 SetMachine
impl Debug for SetMachine
Source§impl<'de> Deserialize<'de> for SetMachine
impl<'de> Deserialize<'de> for SetMachine
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 SetMachine
impl JsonSchema for SetMachine
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 SetMachine
impl RefUnwindSafe for SetMachine
impl Send for SetMachine
impl Sync for SetMachine
impl Unpin for SetMachine
impl UnsafeUnpin for SetMachine
impl UnwindSafe for SetMachine
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