pub struct Request {
pub primitive: String,
pub args: Vec<String>,
pub flags: BTreeMap<String, Option<String>>,
}Expand description
One request from the CLI to the daemon.
Fields§
§primitive: StringPrimitive name, e.g. vs_open.
args: Vec<String>Positional arguments, in order.
flags: BTreeMap<String, Option<String>>Flags. None means a bare flag (e.g. --full-page); Some(v)
means --name=v.
Implementations§
Source§impl Request
impl Request
pub fn new(primitive: impl Into<String>) -> Self
pub fn arg(self, value: impl Into<String>) -> Self
pub fn flag(self, name: impl Into<String>) -> Self
pub fn flag_value( self, name: impl Into<String>, value: impl Into<String>, ) -> Self
Trait Implementations§
impl Eq for Request
impl StructuralPartialEq for Request
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnsafeUnpin for Request
impl UnwindSafe for Request
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