pub struct Params { /* private fields */ }Expand description
A reusable, standalone bag of API call parameters.
It owns the (key, value) form fields for a single Matomo API call,
excluding module/format/auth which the client injects. Serializing it
to its key-value pairs is reused both by the live dispatch path and by
API.getBulkRequest composition.
Implementations§
Source§impl Params
impl Params
pub fn new() -> Self
Sourcepub fn set(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn set(self, key: impl Into<String>, value: impl Into<String>) -> Self
Set an arbitrary param. Replaces any existing value for key.
pub fn id_site(self, id_site: impl Into<IdSite>) -> Self
pub fn period(self, period: Period) -> Self
pub fn segment(self, segment: impl Into<Segment>) -> Self
pub fn limit(self, limit: Limit) -> Self
pub fn offset(self, offset: u32) -> Self
Sourcepub fn fields(&self) -> &[(String, String)]
pub fn fields(&self) -> &[(String, String)]
The raw form fields for this call (without module/format/auth).
Sourcepub fn to_bulk_query(&self, method: &str) -> String
pub fn to_bulk_query(&self, method: &str) -> String
Encode as a query string for embedding inside API.getBulkRequest’s
urls[] parameters (e.g. method=Foo.bar&idSite=1).
Trait Implementations§
impl Eq for Params
impl StructuralPartialEq for Params
Auto Trait Implementations§
impl Freeze for Params
impl RefUnwindSafe for Params
impl Send for Params
impl Sync for Params
impl Unpin for Params
impl UnsafeUnpin for Params
impl UnwindSafe for Params
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