pub struct Pause {
pub me: SessionUri,
pub riff: bool,
pub repository: Option<ThreadName>,
}Expand description
POST /v1/pause: pauses the repository of me, or with riff the
whole riff (01M3XAHZBGSSJB3YX23K88W01K). See
01M3XAHZDSQR263QZVB41CK0MX for who can.
use riff_core::wire::Pause;
let me = "riff://mike@pangolin/como-technologies/riff".parse()?;
let pause = Pause::here(me);
assert_eq!(
serde_json::to_string(&pause).unwrap(),
r#"{"me":"riff://mike@pangolin/como-technologies/riff"}"#
);
let json = serde_json::to_string(&Pause::whole("riff://mike@pangolin".parse()?)).unwrap();
assert_eq!(json, r#"{"me":"riff://mike@pangolin","riff":true}"#);
let whole: Pause = serde_json::from_str(r#"{"me":"riff://mike@pangolin","riff":true}"#).unwrap();
assert!(whole.riff);Fields§
§me: SessionUri§riff: boolTrue pauses the whole riff, not the repository of me.
repository: Option<ThreadName>Pauses this repository, not the repository of me.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Pause
impl<'de> Deserialize<'de> for Pause
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 Pause
impl JsonSchema for Pause
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 Pause
impl RefUnwindSafe for Pause
impl Send for Pause
impl Sync for Pause
impl Unpin for Pause
impl UnsafeUnpin for Pause
impl UnwindSafe for Pause
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