#[non_exhaustive]pub struct ActionRequest {
pub action: String,
pub params: Value,
}Expand description
A dynamically-dispatched UniFi action: an action name matched against
crate::capabilities::all_capabilities, plus its JSON parameters.
#[non_exhaustive]: unlike this crate’s other public types, this one
is meant to be constructed by callers — use ActionRequest::new
rather than a struct literal, so a future added field (e.g. a per-call
timeout override) can default instead of being a downstream semver
break.
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.action: StringAction name, e.g. "clients" or "official_list_devices".
params: ValueAction parameters. Shape depends on the action; see its
crate::capabilities::Capability for the expected path/query/body.
Implementations§
Trait Implementations§
Source§impl Clone for ActionRequest
impl Clone for ActionRequest
Source§fn clone(&self) -> ActionRequest
fn clone(&self) -> ActionRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ActionRequest
impl RefUnwindSafe for ActionRequest
impl Send for ActionRequest
impl Sync for ActionRequest
impl Unpin for ActionRequest
impl UnsafeUnpin for ActionRequest
impl UnwindSafe for ActionRequest
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