#[non_exhaustive]pub struct CliRequest {
pub request_id: String,
pub command: CliCommand,
}Expand description
A request sent from the CLI to the mediator.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.request_id: StringA unique identifier (UUID v4 string) used to correlate requests with responses.
command: CliCommandThe command to execute.
Flattened so the command’s type tag and fields appear at the top level of the JSON
object alongside request_id, e.g. {"request_id":"…","type":"ListWindows"}.
Implementations§
Source§impl CliRequest
impl CliRequest
Sourcepub const fn new(request_id: String, command: CliCommand) -> Self
pub const fn new(request_id: String, command: CliCommand) -> Self
Create a new CliRequest.
Trait Implementations§
Source§impl Clone for CliRequest
impl Clone for CliRequest
Source§fn clone(&self) -> CliRequest
fn clone(&self) -> CliRequest
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 CliRequest
impl Debug for CliRequest
Source§impl<'de> Deserialize<'de> for CliRequest
impl<'de> Deserialize<'de> for CliRequest
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 PartialEq for CliRequest
impl PartialEq for CliRequest
Source§impl Serialize for CliRequest
impl Serialize for CliRequest
impl Eq for CliRequest
impl StructuralPartialEq for CliRequest
Auto Trait Implementations§
impl Freeze for CliRequest
impl RefUnwindSafe for CliRequest
impl Send for CliRequest
impl Sync for CliRequest
impl Unpin for CliRequest
impl UnsafeUnpin for CliRequest
impl UnwindSafe for CliRequest
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