MonitorThresholds

Struct MonitorThresholds 

Source
#[non_exhaustive]
pub struct MonitorThresholds { pub critical: Option<f64>, pub critical_recovery: Option<Option<f64>>, pub ok: Option<Option<f64>>, pub unknown: Option<Option<f64>>, pub warning: Option<Option<f64>>, pub warning_recovery: Option<Option<f64>>, pub additional_properties: BTreeMap<String, Value>, /* private fields */ }
Expand description

List of the different monitor threshold available.

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.
§critical: Option<f64>

The monitor CRITICAL threshold.

§critical_recovery: Option<Option<f64>>

The monitor CRITICAL recovery threshold.

§ok: Option<Option<f64>>

The monitor OK threshold.

§unknown: Option<Option<f64>>

The monitor UNKNOWN threshold.

§warning: Option<Option<f64>>

The monitor WARNING threshold.

§warning_recovery: Option<Option<f64>>

The monitor WARNING recovery threshold.

§additional_properties: BTreeMap<String, Value>

Implementations§

Source§

impl MonitorThresholds

Source

pub fn new() -> MonitorThresholds

Examples found in repository?
examples/v1_monitors_CreateMonitor_2520912138.rs (line 18)
10async fn main() {
11    let body =
12        Monitor::new(
13            r#"ci-tests("type:test @git.branch:staging* @test.status:fail").rollup("count").by("@test.name").last("5m") >= 1"#.to_string(),
14            MonitorType::CI_TESTS_ALERT,
15        )
16            .message("some message Notify: @hipchat-channel".to_string())
17            .name("Example-Monitor".to_string())
18            .options(MonitorOptions::new().thresholds(MonitorThresholds::new().critical(1.0 as f64)))
19            .priority(Some(3))
20            .tags(vec!["test:examplemonitor".to_string(), "env:ci".to_string()]);
21    let configuration = datadog::Configuration::new();
22    let api = MonitorsAPI::with_config(configuration);
23    let resp = api.create_monitor(body).await;
24    if let Ok(value) = resp {
25        println!("{:#?}", value);
26    } else {
27        println!("{:#?}", resp.unwrap_err());
28    }
29}
More examples
Hide additional examples
examples/v1_monitors_CreateMonitor_440013737.rs (line 20)
11async fn main() {
12    let body =
13        Monitor::new(
14            r#"error-tracking-rum("service:foo AND @error.source:source").rollup("count").by("@issue.id").last("1h") >= 1"#.to_string(),
15            MonitorType::ERROR_TRACKING_ALERT,
16        )
17            .draft_status(MonitorDraftStatus::DRAFT)
18            .message("some message".to_string())
19            .name("Example-Monitor".to_string())
20            .options(MonitorOptions::new().thresholds(MonitorThresholds::new().critical(1.0 as f64)))
21            .priority(Some(3))
22            .tags(vec!["test:examplemonitor".to_string(), "env:ci".to_string()]);
23    let configuration = datadog::Configuration::new();
24    let api = MonitorsAPI::with_config(configuration);
25    let resp = api.create_monitor(body).await;
26    if let Ok(value) = resp {
27        println!("{:#?}", value);
28    } else {
29        println!("{:#?}", resp.unwrap_err());
30    }
31}
examples/v1_monitors_CreateMonitor_3790803616.rs (line 18)
10async fn main() {
11    let body =
12        Monitor::new(
13            r#"ci-pipelines("ci_level:pipeline @git.branch:staging* @ci.status:error").rollup("count").by("@git.branch,@ci.pipeline.name").last("5m") >= 1"#.to_string(),
14            MonitorType::CI_PIPELINES_ALERT,
15        )
16            .message("some message Notify: @hipchat-channel".to_string())
17            .name("Example-Monitor".to_string())
18            .options(MonitorOptions::new().thresholds(MonitorThresholds::new().critical(1.0 as f64)))
19            .priority(Some(3))
20            .tags(vec!["test:examplemonitor".to_string(), "env:ci".to_string()]);
21    let configuration = datadog::Configuration::new();
22    let api = MonitorsAPI::with_config(configuration);
23    let resp = api.create_monitor(body).await;
24    if let Ok(value) = resp {
25        println!("{:#?}", value);
26    } else {
27        println!("{:#?}", resp.unwrap_err());
28    }
29}
examples/v1_monitors_UpdateMonitor.rs (line 20)
9async fn main() {
10    // there is a valid "monitor" in the system
11    let monitor_id: i64 = std::env::var("MONITOR_ID").unwrap().parse().unwrap();
12    let body = MonitorUpdateRequest::new()
13        .name("My monitor-updated".to_string())
14        .options(
15            MonitorOptions::new()
16                .evaluation_delay(None)
17                .new_group_delay(Some(600))
18                .new_host_delay(None)
19                .renotify_interval(None)
20                .thresholds(MonitorThresholds::new().critical(2.0 as f64).warning(None))
21                .timeout_h(None),
22        )
23        .priority(None);
24    let configuration = datadog::Configuration::new();
25    let api = MonitorsAPI::with_config(configuration);
26    let resp = api.update_monitor(monitor_id.clone(), body).await;
27    if let Ok(value) = resp {
28        println!("{:#?}", value);
29    } else {
30        println!("{:#?}", resp.unwrap_err());
31    }
32}
examples/v1_monitors_CreateMonitor_2012680290.rs (line 28)
12async fn main() {
13    let body = Monitor::new(
14        "avg(current_1mo):avg:system.load.5{*} > 0.5".to_string(),
15        MonitorType::METRIC_ALERT,
16    )
17    .message("some message Notify: @hipchat-channel".to_string())
18    .name("Example-Monitor".to_string())
19    .options(
20        MonitorOptions::new()
21            .scheduling_options(
22                MonitorOptionsSchedulingOptions::new().evaluation_window(
23                    MonitorOptionsSchedulingOptionsEvaluationWindow::new()
24                        .day_starts("04:00".to_string())
25                        .month_starts(1),
26                ),
27            )
28            .thresholds(MonitorThresholds::new().critical(0.5 as f64)),
29    );
30    let configuration = datadog::Configuration::new();
31    let api = MonitorsAPI::with_config(configuration);
32    let resp = api.create_monitor(body).await;
33    if let Ok(value) = resp {
34        println!("{:#?}", value);
35    } else {
36        println!("{:#?}", resp.unwrap_err());
37    }
38}
examples/v1_monitors_CreateMonitor_1539578087.rs (line 41)
15async fn main() {
16    let body = Monitor::new(
17        "avg(current_1mo):avg:system.load.5{*} > 0.5".to_string(),
18        MonitorType::QUERY_ALERT,
19    )
20    .draft_status(MonitorDraftStatus::PUBLISHED)
21    .message("some message Notify: @hipchat-channel".to_string())
22    .name("Example-Monitor".to_string())
23    .options(
24        MonitorOptions::new()
25            .include_tags(false)
26            .notify_audit(false)
27            .scheduling_options(
28                MonitorOptionsSchedulingOptions::new()
29                    .custom_schedule(MonitorOptionsCustomSchedule::new().recurrences(vec![
30                                        MonitorOptionsCustomScheduleRecurrence::new()
31                                            .rrule("FREQ=DAILY;INTERVAL=1".to_string())
32                                            .start("2024-10-26T09:13:00".to_string())
33                                            .timezone("America/Los_Angeles".to_string())
34                                    ]))
35                    .evaluation_window(
36                        MonitorOptionsSchedulingOptionsEvaluationWindow::new()
37                            .day_starts("04:00".to_string())
38                            .month_starts(1),
39                    ),
40            )
41            .thresholds(MonitorThresholds::new().critical(0.5 as f64)),
42    )
43    .tags(vec![]);
44    let configuration = datadog::Configuration::new();
45    let api = MonitorsAPI::with_config(configuration);
46    let resp = api.create_monitor(body).await;
47    if let Ok(value) = resp {
48        println!("{:#?}", value);
49    } else {
50        println!("{:#?}", resp.unwrap_err());
51    }
52}
Source

pub fn critical(self, value: f64) -> Self

Examples found in repository?
examples/v1_monitors_CreateMonitor_2520912138.rs (line 18)
10async fn main() {
11    let body =
12        Monitor::new(
13            r#"ci-tests("type:test @git.branch:staging* @test.status:fail").rollup("count").by("@test.name").last("5m") >= 1"#.to_string(),
14            MonitorType::CI_TESTS_ALERT,
15        )
16            .message("some message Notify: @hipchat-channel".to_string())
17            .name("Example-Monitor".to_string())
18            .options(MonitorOptions::new().thresholds(MonitorThresholds::new().critical(1.0 as f64)))
19            .priority(Some(3))
20            .tags(vec!["test:examplemonitor".to_string(), "env:ci".to_string()]);
21    let configuration = datadog::Configuration::new();
22    let api = MonitorsAPI::with_config(configuration);
23    let resp = api.create_monitor(body).await;
24    if let Ok(value) = resp {
25        println!("{:#?}", value);
26    } else {
27        println!("{:#?}", resp.unwrap_err());
28    }
29}
More examples
Hide additional examples
examples/v1_monitors_CreateMonitor_440013737.rs (line 20)
11async fn main() {
12    let body =
13        Monitor::new(
14            r#"error-tracking-rum("service:foo AND @error.source:source").rollup("count").by("@issue.id").last("1h") >= 1"#.to_string(),
15            MonitorType::ERROR_TRACKING_ALERT,
16        )
17            .draft_status(MonitorDraftStatus::DRAFT)
18            .message("some message".to_string())
19            .name("Example-Monitor".to_string())
20            .options(MonitorOptions::new().thresholds(MonitorThresholds::new().critical(1.0 as f64)))
21            .priority(Some(3))
22            .tags(vec!["test:examplemonitor".to_string(), "env:ci".to_string()]);
23    let configuration = datadog::Configuration::new();
24    let api = MonitorsAPI::with_config(configuration);
25    let resp = api.create_monitor(body).await;
26    if let Ok(value) = resp {
27        println!("{:#?}", value);
28    } else {
29        println!("{:#?}", resp.unwrap_err());
30    }
31}
examples/v1_monitors_CreateMonitor_3790803616.rs (line 18)
10async fn main() {
11    let body =
12        Monitor::new(
13            r#"ci-pipelines("ci_level:pipeline @git.branch:staging* @ci.status:error").rollup("count").by("@git.branch,@ci.pipeline.name").last("5m") >= 1"#.to_string(),
14            MonitorType::CI_PIPELINES_ALERT,
15        )
16            .message("some message Notify: @hipchat-channel".to_string())
17            .name("Example-Monitor".to_string())
18            .options(MonitorOptions::new().thresholds(MonitorThresholds::new().critical(1.0 as f64)))
19            .priority(Some(3))
20            .tags(vec!["test:examplemonitor".to_string(), "env:ci".to_string()]);
21    let configuration = datadog::Configuration::new();
22    let api = MonitorsAPI::with_config(configuration);
23    let resp = api.create_monitor(body).await;
24    if let Ok(value) = resp {
25        println!("{:#?}", value);
26    } else {
27        println!("{:#?}", resp.unwrap_err());
28    }
29}
examples/v1_monitors_UpdateMonitor.rs (line 20)
9async fn main() {
10    // there is a valid "monitor" in the system
11    let monitor_id: i64 = std::env::var("MONITOR_ID").unwrap().parse().unwrap();
12    let body = MonitorUpdateRequest::new()
13        .name("My monitor-updated".to_string())
14        .options(
15            MonitorOptions::new()
16                .evaluation_delay(None)
17                .new_group_delay(Some(600))
18                .new_host_delay(None)
19                .renotify_interval(None)
20                .thresholds(MonitorThresholds::new().critical(2.0 as f64).warning(None))
21                .timeout_h(None),
22        )
23        .priority(None);
24    let configuration = datadog::Configuration::new();
25    let api = MonitorsAPI::with_config(configuration);
26    let resp = api.update_monitor(monitor_id.clone(), body).await;
27    if let Ok(value) = resp {
28        println!("{:#?}", value);
29    } else {
30        println!("{:#?}", resp.unwrap_err());
31    }
32}
examples/v1_monitors_CreateMonitor_2012680290.rs (line 28)
12async fn main() {
13    let body = Monitor::new(
14        "avg(current_1mo):avg:system.load.5{*} > 0.5".to_string(),
15        MonitorType::METRIC_ALERT,
16    )
17    .message("some message Notify: @hipchat-channel".to_string())
18    .name("Example-Monitor".to_string())
19    .options(
20        MonitorOptions::new()
21            .scheduling_options(
22                MonitorOptionsSchedulingOptions::new().evaluation_window(
23                    MonitorOptionsSchedulingOptionsEvaluationWindow::new()
24                        .day_starts("04:00".to_string())
25                        .month_starts(1),
26                ),
27            )
28            .thresholds(MonitorThresholds::new().critical(0.5 as f64)),
29    );
30    let configuration = datadog::Configuration::new();
31    let api = MonitorsAPI::with_config(configuration);
32    let resp = api.create_monitor(body).await;
33    if let Ok(value) = resp {
34        println!("{:#?}", value);
35    } else {
36        println!("{:#?}", resp.unwrap_err());
37    }
38}
examples/v1_monitors_CreateMonitor_1539578087.rs (line 41)
15async fn main() {
16    let body = Monitor::new(
17        "avg(current_1mo):avg:system.load.5{*} > 0.5".to_string(),
18        MonitorType::QUERY_ALERT,
19    )
20    .draft_status(MonitorDraftStatus::PUBLISHED)
21    .message("some message Notify: @hipchat-channel".to_string())
22    .name("Example-Monitor".to_string())
23    .options(
24        MonitorOptions::new()
25            .include_tags(false)
26            .notify_audit(false)
27            .scheduling_options(
28                MonitorOptionsSchedulingOptions::new()
29                    .custom_schedule(MonitorOptionsCustomSchedule::new().recurrences(vec![
30                                        MonitorOptionsCustomScheduleRecurrence::new()
31                                            .rrule("FREQ=DAILY;INTERVAL=1".to_string())
32                                            .start("2024-10-26T09:13:00".to_string())
33                                            .timezone("America/Los_Angeles".to_string())
34                                    ]))
35                    .evaluation_window(
36                        MonitorOptionsSchedulingOptionsEvaluationWindow::new()
37                            .day_starts("04:00".to_string())
38                            .month_starts(1),
39                    ),
40            )
41            .thresholds(MonitorThresholds::new().critical(0.5 as f64)),
42    )
43    .tags(vec![]);
44    let configuration = datadog::Configuration::new();
45    let api = MonitorsAPI::with_config(configuration);
46    let resp = api.create_monitor(body).await;
47    if let Ok(value) = resp {
48        println!("{:#?}", value);
49    } else {
50        println!("{:#?}", resp.unwrap_err());
51    }
52}
Source

pub fn critical_recovery(self, value: Option<f64>) -> Self

Source

pub fn ok(self, value: Option<f64>) -> Self

Source

pub fn unknown(self, value: Option<f64>) -> Self

Source

pub fn warning(self, value: Option<f64>) -> Self

Examples found in repository?
examples/v1_monitors_UpdateMonitor.rs (line 20)
9async fn main() {
10    // there is a valid "monitor" in the system
11    let monitor_id: i64 = std::env::var("MONITOR_ID").unwrap().parse().unwrap();
12    let body = MonitorUpdateRequest::new()
13        .name("My monitor-updated".to_string())
14        .options(
15            MonitorOptions::new()
16                .evaluation_delay(None)
17                .new_group_delay(Some(600))
18                .new_host_delay(None)
19                .renotify_interval(None)
20                .thresholds(MonitorThresholds::new().critical(2.0 as f64).warning(None))
21                .timeout_h(None),
22        )
23        .priority(None);
24    let configuration = datadog::Configuration::new();
25    let api = MonitorsAPI::with_config(configuration);
26    let resp = api.update_monitor(monitor_id.clone(), body).await;
27    if let Ok(value) = resp {
28        println!("{:#?}", value);
29    } else {
30        println!("{:#?}", resp.unwrap_err());
31    }
32}
More examples
Hide additional examples
examples/v1_monitors_ValidateMonitor.rs (line 35)
12async fn main() {
13    let body =
14        Monitor::new(
15            r#"logs("service:foo AND type:error").index("main").rollup("count").by("source").last("5m") > 2"#.to_string(),
16            MonitorType::LOG_ALERT,
17        )
18            .message("some message Notify: @hipchat-channel".to_string())
19            .name("Example-Monitor".to_string())
20            .options(
21                MonitorOptions::new()
22                    .enable_logs_sample(true)
23                    .escalation_message("the situation has escalated".to_string())
24                    .evaluation_delay(Some(700))
25                    .include_tags(true)
26                    .locked(false)
27                    .new_host_delay(Some(600))
28                    .no_data_timeframe(None)
29                    .notification_preset_name(MonitorOptionsNotificationPresets::HIDE_HANDLES)
30                    .notify_audit(false)
31                    .notify_no_data(false)
32                    .on_missing_data(OnMissingDataOption::SHOW_AND_NOTIFY_NO_DATA)
33                    .renotify_interval(Some(60))
34                    .require_full_window(true)
35                    .thresholds(MonitorThresholds::new().critical(2.0 as f64).warning(Some(1.0 as f64)))
36                    .timeout_h(Some(24)),
37            )
38            .priority(Some(3))
39            .tags(vec!["test:examplemonitor".to_string(), "env:ci".to_string()]);
40    let configuration = datadog::Configuration::new();
41    let api = MonitorsAPI::with_config(configuration);
42    let resp = api.validate_monitor(body).await;
43    if let Ok(value) = resp {
44        println!("{:#?}", value);
45    } else {
46        println!("{:#?}", resp.unwrap_err());
47    }
48}
examples/v1_monitors_ValidateMonitor_4247196452.rs (line 35)
11async fn main() {
12    let body =
13        Monitor::new(
14            r#"logs("service:foo AND type:error").index("main").rollup("count").by("source,status").last("5m") > 2"#.to_string(),
15            MonitorType::LOG_ALERT,
16        )
17            .message("some message Notify: @hipchat-channel".to_string())
18            .name("Example-Monitor".to_string())
19            .options(
20                MonitorOptions::new()
21                    .enable_logs_sample(true)
22                    .escalation_message("the situation has escalated".to_string())
23                    .evaluation_delay(Some(700))
24                    .group_retention_duration("2d".to_string())
25                    .include_tags(true)
26                    .locked(false)
27                    .new_host_delay(Some(600))
28                    .no_data_timeframe(None)
29                    .notify_audit(false)
30                    .notify_by(vec!["status".to_string()])
31                    .notify_no_data(false)
32                    .on_missing_data(OnMissingDataOption::SHOW_AND_NOTIFY_NO_DATA)
33                    .renotify_interval(Some(60))
34                    .require_full_window(true)
35                    .thresholds(MonitorThresholds::new().critical(2.0 as f64).warning(Some(1.0 as f64)))
36                    .timeout_h(Some(24)),
37            )
38            .priority(Some(3))
39            .tags(vec!["test:examplemonitor".to_string(), "env:ci".to_string()]);
40    let configuration = datadog::Configuration::new();
41    let api = MonitorsAPI::with_config(configuration);
42    let resp = api.validate_monitor(body).await;
43    if let Ok(value) = resp {
44        println!("{:#?}", value);
45    } else {
46        println!("{:#?}", resp.unwrap_err());
47    }
48}
examples/v1_monitors_CreateMonitor_1303514967.rs (line 25)
14async fn main() {
15    let body =
16        Monitor::new(
17            r#"formula("exclude_null(query1)").last("7d").anomaly(direction="above", threshold=10) >= 5"#.to_string(),
18            MonitorType::COST_ALERT,
19        )
20            .message("some message Notify: @hipchat-channel".to_string())
21            .name("Example Monitor".to_string())
22            .options(
23                MonitorOptions::new()
24                    .include_tags(true)
25                    .thresholds(MonitorThresholds::new().critical(5.0 as f64).warning(Some(3.0 as f64)))
26                    .variables(
27                        vec![
28                            MonitorFormulaAndFunctionQueryDefinition::MonitorFormulaAndFunctionCostQueryDefinition(
29                                Box::new(
30                                    MonitorFormulaAndFunctionCostQueryDefinition::new(
31                                        MonitorFormulaAndFunctionCostDataSource::CLOUD_COST,
32                                        "query1".to_string(),
33                                        "sum:aws.cost.net.amortized.shared.resources.allocated{aws_product IN (amplify ,athena, backup, bedrock ) } by {aws_product}.rollup(sum, 86400)".to_string(),
34                                    ).aggregator(MonitorFormulaAndFunctionCostAggregator::SUM),
35                                ),
36                            )
37                        ],
38                    ),
39            )
40            .priority(Some(3))
41            .tags(vec!["test:examplemonitor".to_string(), "env:ci".to_string()]);
42    let configuration = datadog::Configuration::new();
43    let api = MonitorsAPI::with_config(configuration);
44    let resp = api.create_monitor(body).await;
45    if let Ok(value) = resp {
46        println!("{:#?}", value);
47    } else {
48        println!("{:#?}", resp.unwrap_err());
49    }
50}
examples/v1_monitors_ValidateExistingMonitor.rs (line 37)
12async fn main() {
13    // there is a valid "monitor" in the system
14    let monitor_id: i64 = std::env::var("MONITOR_ID").unwrap().parse().unwrap();
15    let body =
16        Monitor::new(
17            r#"logs("service:foo AND type:error").index("main").rollup("count").by("source").last("5m") > 2"#.to_string(),
18            MonitorType::LOG_ALERT,
19        )
20            .message("some message Notify: @hipchat-channel".to_string())
21            .name("Example-Monitor".to_string())
22            .options(
23                MonitorOptions::new()
24                    .enable_logs_sample(true)
25                    .escalation_message("the situation has escalated".to_string())
26                    .evaluation_delay(Some(700))
27                    .include_tags(true)
28                    .locked(false)
29                    .new_host_delay(Some(600))
30                    .no_data_timeframe(None)
31                    .notification_preset_name(MonitorOptionsNotificationPresets::HIDE_HANDLES)
32                    .notify_audit(false)
33                    .notify_no_data(false)
34                    .on_missing_data(OnMissingDataOption::SHOW_AND_NOTIFY_NO_DATA)
35                    .renotify_interval(Some(60))
36                    .require_full_window(true)
37                    .thresholds(MonitorThresholds::new().critical(2.0 as f64).warning(Some(1.0 as f64)))
38                    .timeout_h(Some(24)),
39            )
40            .priority(Some(3))
41            .tags(vec!["test:examplemonitor".to_string(), "env:ci".to_string()]);
42    let configuration = datadog::Configuration::new();
43    let api = MonitorsAPI::with_config(configuration);
44    let resp = api
45        .validate_existing_monitor(monitor_id.clone(), body)
46        .await;
47    if let Ok(value) = resp {
48        println!("{:#?}", value);
49    } else {
50        println!("{:#?}", resp.unwrap_err());
51    }
52}
Source

pub fn warning_recovery(self, value: Option<f64>) -> Self

Source

pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self

Trait Implementations§

Source§

impl Clone for MonitorThresholds

Source§

fn clone(&self) -> MonitorThresholds

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MonitorThresholds

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for MonitorThresholds

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for MonitorThresholds

Source§

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 MonitorThresholds

Source§

fn eq(&self, other: &MonitorThresholds) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for MonitorThresholds

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for MonitorThresholds

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,