pub struct Selectors<'a> { /* private fields */ }Expand description
/v1/monitors/:id/selectors — selectors nested under a monitor.
Implementations§
Source§impl Selectors<'_>
impl Selectors<'_>
Sourcepub async fn list(&self, monitor_id: i64) -> Result<Page<Selector>>
pub async fn list(&self, monitor_id: i64) -> Result<Page<Selector>>
GET /v1/monitors/:id/selectors (bare array, normalized to Page).
Sourcepub async fn create(&self, monitor_id: i64, body: Value) -> Result<Selector>
pub async fn create(&self, monitor_id: i64, body: Value) -> Result<Selector>
POST /v1/monitors/:id/selectors — requires a non-empty selector.
Sourcepub async fn get(&self, monitor_id: i64, selector_id: i64) -> Result<Selector>
pub async fn get(&self, monitor_id: i64, selector_id: i64) -> Result<Selector>
GET /v1/monitors/:id/selectors/:sid.
Sourcepub async fn update(
&self,
monitor_id: i64,
selector_id: i64,
patch: Value,
) -> Result<Selector>
pub async fn update( &self, monitor_id: i64, selector_id: i64, patch: Value, ) -> Result<Selector>
PATCH /v1/monitors/:id/selectors/:sid.
Sourcepub async fn delete(&self, monitor_id: i64, selector_id: i64) -> Result<Value>
pub async fn delete(&self, monitor_id: i64, selector_id: i64) -> Result<Value>
DELETE /v1/monitors/:id/selectors/:sid.
Sourcepub async fn toggle(&self, monitor_id: i64, selector_id: i64) -> Result<Value>
pub async fn toggle(&self, monitor_id: i64, selector_id: i64) -> Result<Value>
POST .../selectors/:sid/toggle — flip enabled.
Sourcepub async fn test(&self, monitor_id: i64, selector_id: i64) -> Result<Value>
pub async fn test(&self, monitor_id: i64, selector_id: i64) -> Result<Value>
POST .../selectors/:sid/test — live one-off probe, nothing persisted.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Selectors<'a>
impl<'a> !UnwindSafe for Selectors<'a>
impl<'a> Freeze for Selectors<'a>
impl<'a> Send for Selectors<'a>
impl<'a> Sync for Selectors<'a>
impl<'a> Unpin for Selectors<'a>
impl<'a> UnsafeUnpin for Selectors<'a>
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