Struct SensitiveDataScannerAPI

Source
pub struct SensitiveDataScannerAPI { /* private fields */ }
Expand description

Create, update, delete, and retrieve sensitive data scanner groups and rules. See the Sensitive Data Scanner page for more information.

Implementations§

Source§

impl SensitiveDataScannerAPI

Source

pub fn new() -> Self

Source

pub fn with_config(config: Configuration) -> Self

Examples found in repository?
examples/v2_sensitive-data-scanner_ListScanningGroups.rs (line 8)
6async fn main() {
7    let configuration = datadog::Configuration::new();
8    let api = SensitiveDataScannerAPI::with_config(configuration);
9    let resp = api.list_scanning_groups().await;
10    if let Ok(value) = resp {
11        println!("{:#?}", value);
12    } else {
13        println!("{:#?}", resp.unwrap_err());
14    }
15}
More examples
Hide additional examples
examples/v2_sensitive-data-scanner_ListStandardPatterns.rs (line 8)
6async fn main() {
7    let configuration = datadog::Configuration::new();
8    let api = SensitiveDataScannerAPI::with_config(configuration);
9    let resp = api.list_standard_patterns().await;
10    if let Ok(value) = resp {
11        println!("{:#?}", value);
12    } else {
13        println!("{:#?}", resp.unwrap_err());
14    }
15}
examples/v2_sensitive-data-scanner_DeleteScanningRule.rs (line 14)
8async fn main() {
9    // the "scanning_group" has a "scanning_rule"
10    let rule_data_id = std::env::var("RULE_DATA_ID").unwrap();
11    let body =
12        SensitiveDataScannerRuleDeleteRequest::new(SensitiveDataScannerMetaVersionOnly::new());
13    let configuration = datadog::Configuration::new();
14    let api = SensitiveDataScannerAPI::with_config(configuration);
15    let resp = api.delete_scanning_rule(rule_data_id.clone(), body).await;
16    if let Ok(value) = resp {
17        println!("{:#?}", value);
18    } else {
19        println!("{:#?}", resp.unwrap_err());
20    }
21}
examples/v2_sensitive-data-scanner_DeleteScanningGroup.rs (line 14)
8async fn main() {
9    // there is a valid "scanning_group" in the system
10    let group_data_id = std::env::var("GROUP_DATA_ID").unwrap();
11    let body =
12        SensitiveDataScannerGroupDeleteRequest::new(SensitiveDataScannerMetaVersionOnly::new());
13    let configuration = datadog::Configuration::new();
14    let api = SensitiveDataScannerAPI::with_config(configuration);
15    let resp = api.delete_scanning_group(group_data_id.clone(), body).await;
16    if let Ok(value) = resp {
17        println!("{:#?}", value);
18    } else {
19        println!("{:#?}", resp.unwrap_err());
20    }
21}
examples/v2_sensitive-data-scanner_ReorderScanningGroups.rs (line 36)
14async fn main() {
15    // there is a valid "scanning_group" in the system
16    let group_data_id = std::env::var("GROUP_DATA_ID").unwrap();
17
18    // a valid "configuration" in the system
19    let configuration_data_id = std::env::var("CONFIGURATION_DATA_ID").unwrap();
20    let body = SensitiveDataScannerConfigRequest::new(
21        SensitiveDataScannerReorderConfig::new()
22            .id(configuration_data_id.clone())
23            .relationships(
24                SensitiveDataScannerConfigurationRelationships::new().groups(
25                    SensitiveDataScannerGroupList::new().data(vec![
26                        SensitiveDataScannerGroupItem::new()
27                            .id(group_data_id.clone())
28                            .type_(SensitiveDataScannerGroupType::SENSITIVE_DATA_SCANNER_GROUP),
29                    ]),
30                ),
31            )
32            .type_(SensitiveDataScannerConfigurationType::SENSITIVE_DATA_SCANNER_CONFIGURATIONS),
33        SensitiveDataScannerMetaVersionOnly::new(),
34    );
35    let configuration = datadog::Configuration::new();
36    let api = SensitiveDataScannerAPI::with_config(configuration);
37    let resp = api.reorder_scanning_groups(body).await;
38    if let Ok(value) = resp {
39        println!("{:#?}", value);
40    } else {
41        println!("{:#?}", resp.unwrap_err());
42    }
43}
examples/v2_sensitive-data-scanner_UpdateScanningRule.rs (line 42)
14async fn main() {
15    // the "scanning_group" has a "scanning_rule"
16    let rule_data_id = std::env::var("RULE_DATA_ID").unwrap();
17    let body = SensitiveDataScannerRuleUpdateRequest::new(
18        SensitiveDataScannerRuleUpdate::new()
19            .attributes(
20                SensitiveDataScannerRuleAttributes::new()
21                    .included_keyword_configuration(
22                        SensitiveDataScannerIncludedKeywordConfiguration::new(
23                            35,
24                            vec!["credit card".to_string(), "cc".to_string()],
25                        ),
26                    )
27                    .is_enabled(true)
28                    .name("Example-Sensitive-Data-Scanner".to_string())
29                    .pattern("pattern".to_string())
30                    .priority(5)
31                    .tags(vec!["sensitive_data:true".to_string()])
32                    .text_replacement(
33                        SensitiveDataScannerTextReplacement::new()
34                            .type_(SensitiveDataScannerTextReplacementType::NONE),
35                    ),
36            )
37            .id(rule_data_id.clone())
38            .type_(SensitiveDataScannerRuleType::SENSITIVE_DATA_SCANNER_RULE),
39        SensitiveDataScannerMetaVersionOnly::new(),
40    );
41    let configuration = datadog::Configuration::new();
42    let api = SensitiveDataScannerAPI::with_config(configuration);
43    let resp = api.update_scanning_rule(rule_data_id.clone(), body).await;
44    if let Ok(value) = resp {
45        println!("{:#?}", value);
46    } else {
47        println!("{:#?}", resp.unwrap_err());
48    }
49}
Source

pub fn with_client_and_config( config: Configuration, client: ClientWithMiddleware, ) -> Self

Source

pub async fn create_scanning_group( &self, body: SensitiveDataScannerGroupCreateRequest, ) -> Result<SensitiveDataScannerCreateGroupResponse, Error<CreateScanningGroupError>>

Create a scanning group. The request MAY include a configuration relationship. A rules relationship can be omitted entirely, but if it is included it MUST be null or an empty array (rules cannot be created at the same time). The new group will be ordered last within the configuration.

Examples found in repository?
examples/v2_sensitive-data-scanner_CreateScanningGroup.rs (line 49)
18async fn main() {
19    // a valid "configuration" in the system
20    let configuration_data_id = std::env::var("CONFIGURATION_DATA_ID").unwrap();
21    let body =
22        SensitiveDataScannerGroupCreateRequest::new()
23            .data(
24                SensitiveDataScannerGroupCreate::new(
25                    SensitiveDataScannerGroupAttributes::new()
26                        .filter(SensitiveDataScannerFilter::new().query("*".to_string()))
27                        .is_enabled(false)
28                        .name("Example-Sensitive-Data-Scanner".to_string())
29                        .product_list(vec![SensitiveDataScannerProduct::LOGS]),
30                    SensitiveDataScannerGroupType::SENSITIVE_DATA_SCANNER_GROUP,
31                ).relationships(
32                    SensitiveDataScannerGroupRelationships::new()
33                        .configuration(
34                            SensitiveDataScannerConfigurationData
35                            ::new().data(
36                                SensitiveDataScannerConfiguration::new()
37                                    .id(configuration_data_id.clone())
38                                    .type_(
39                                        SensitiveDataScannerConfigurationType::SENSITIVE_DATA_SCANNER_CONFIGURATIONS,
40                                    ),
41                            ),
42                        )
43                        .rules(SensitiveDataScannerRuleData::new().data(vec![])),
44                ),
45            )
46            .meta(SensitiveDataScannerMetaVersionOnly::new());
47    let configuration = datadog::Configuration::new();
48    let api = SensitiveDataScannerAPI::with_config(configuration);
49    let resp = api.create_scanning_group(body).await;
50    if let Ok(value) = resp {
51        println!("{:#?}", value);
52    } else {
53        println!("{:#?}", resp.unwrap_err());
54    }
55}
Source

pub async fn create_scanning_group_with_http_info( &self, body: SensitiveDataScannerGroupCreateRequest, ) -> Result<ResponseContent<SensitiveDataScannerCreateGroupResponse>, Error<CreateScanningGroupError>>

Create a scanning group. The request MAY include a configuration relationship. A rules relationship can be omitted entirely, but if it is included it MUST be null or an empty array (rules cannot be created at the same time). The new group will be ordered last within the configuration.

Source

pub async fn create_scanning_rule( &self, body: SensitiveDataScannerRuleCreateRequest, ) -> Result<SensitiveDataScannerCreateRuleResponse, Error<CreateScanningRuleError>>

Create a scanning rule in a sensitive data scanner group, ordered last. The posted rule MUST include a group relationship. It MUST include either a standard_pattern relationship or a regex attribute, but not both. If included_attributes is empty or missing, we will scan all attributes except excluded_attributes. If both are missing, we will scan the whole event.

Examples found in repository?
examples/v2_sensitive-data-scanner_CreateScanningRule.rs (line 54)
18async fn main() {
19    // there is a valid "scanning_group" in the system
20    let group_data_id = std::env::var("GROUP_DATA_ID").unwrap();
21    let body = SensitiveDataScannerRuleCreateRequest::new(
22        SensitiveDataScannerRuleCreate::new(
23            SensitiveDataScannerRuleAttributes::new()
24                .excluded_namespaces(vec!["admin.name".to_string()])
25                .included_keyword_configuration(
26                    SensitiveDataScannerIncludedKeywordConfiguration::new(
27                        35,
28                        vec!["credit card".to_string()],
29                    ),
30                )
31                .is_enabled(true)
32                .name("Example-Sensitive-Data-Scanner".to_string())
33                .namespaces(vec!["admin".to_string()])
34                .pattern("pattern".to_string())
35                .priority(1)
36                .tags(vec!["sensitive_data:true".to_string()])
37                .text_replacement(
38                    SensitiveDataScannerTextReplacement::new()
39                        .type_(SensitiveDataScannerTextReplacementType::NONE),
40                ),
41            SensitiveDataScannerRuleRelationships::new().group(
42                SensitiveDataScannerGroupData::new().data(
43                    SensitiveDataScannerGroup::new()
44                        .id(group_data_id.clone())
45                        .type_(SensitiveDataScannerGroupType::SENSITIVE_DATA_SCANNER_GROUP),
46                ),
47            ),
48            SensitiveDataScannerRuleType::SENSITIVE_DATA_SCANNER_RULE,
49        ),
50        SensitiveDataScannerMetaVersionOnly::new(),
51    );
52    let configuration = datadog::Configuration::new();
53    let api = SensitiveDataScannerAPI::with_config(configuration);
54    let resp = api.create_scanning_rule(body).await;
55    if let Ok(value) = resp {
56        println!("{:#?}", value);
57    } else {
58        println!("{:#?}", resp.unwrap_err());
59    }
60}
Source

pub async fn create_scanning_rule_with_http_info( &self, body: SensitiveDataScannerRuleCreateRequest, ) -> Result<ResponseContent<SensitiveDataScannerCreateRuleResponse>, Error<CreateScanningRuleError>>

Create a scanning rule in a sensitive data scanner group, ordered last. The posted rule MUST include a group relationship. It MUST include either a standard_pattern relationship or a regex attribute, but not both. If included_attributes is empty or missing, we will scan all attributes except excluded_attributes. If both are missing, we will scan the whole event.

Source

pub async fn delete_scanning_group( &self, group_id: String, body: SensitiveDataScannerGroupDeleteRequest, ) -> Result<SensitiveDataScannerGroupDeleteResponse, Error<DeleteScanningGroupError>>

Delete a given group.

Examples found in repository?
examples/v2_sensitive-data-scanner_DeleteScanningGroup.rs (line 15)
8async fn main() {
9    // there is a valid "scanning_group" in the system
10    let group_data_id = std::env::var("GROUP_DATA_ID").unwrap();
11    let body =
12        SensitiveDataScannerGroupDeleteRequest::new(SensitiveDataScannerMetaVersionOnly::new());
13    let configuration = datadog::Configuration::new();
14    let api = SensitiveDataScannerAPI::with_config(configuration);
15    let resp = api.delete_scanning_group(group_data_id.clone(), body).await;
16    if let Ok(value) = resp {
17        println!("{:#?}", value);
18    } else {
19        println!("{:#?}", resp.unwrap_err());
20    }
21}
Source

pub async fn delete_scanning_group_with_http_info( &self, group_id: String, body: SensitiveDataScannerGroupDeleteRequest, ) -> Result<ResponseContent<SensitiveDataScannerGroupDeleteResponse>, Error<DeleteScanningGroupError>>

Delete a given group.

Source

pub async fn delete_scanning_rule( &self, rule_id: String, body: SensitiveDataScannerRuleDeleteRequest, ) -> Result<SensitiveDataScannerRuleDeleteResponse, Error<DeleteScanningRuleError>>

Delete a given rule.

Examples found in repository?
examples/v2_sensitive-data-scanner_DeleteScanningRule.rs (line 15)
8async fn main() {
9    // the "scanning_group" has a "scanning_rule"
10    let rule_data_id = std::env::var("RULE_DATA_ID").unwrap();
11    let body =
12        SensitiveDataScannerRuleDeleteRequest::new(SensitiveDataScannerMetaVersionOnly::new());
13    let configuration = datadog::Configuration::new();
14    let api = SensitiveDataScannerAPI::with_config(configuration);
15    let resp = api.delete_scanning_rule(rule_data_id.clone(), body).await;
16    if let Ok(value) = resp {
17        println!("{:#?}", value);
18    } else {
19        println!("{:#?}", resp.unwrap_err());
20    }
21}
Source

pub async fn delete_scanning_rule_with_http_info( &self, rule_id: String, body: SensitiveDataScannerRuleDeleteRequest, ) -> Result<ResponseContent<SensitiveDataScannerRuleDeleteResponse>, Error<DeleteScanningRuleError>>

Delete a given rule.

Source

pub async fn list_scanning_groups( &self, ) -> Result<SensitiveDataScannerGetConfigResponse, Error<ListScanningGroupsError>>

List all the Scanning groups in your organization.

Examples found in repository?
examples/v2_sensitive-data-scanner_ListScanningGroups.rs (line 9)
6async fn main() {
7    let configuration = datadog::Configuration::new();
8    let api = SensitiveDataScannerAPI::with_config(configuration);
9    let resp = api.list_scanning_groups().await;
10    if let Ok(value) = resp {
11        println!("{:#?}", value);
12    } else {
13        println!("{:#?}", resp.unwrap_err());
14    }
15}
Source

pub async fn list_scanning_groups_with_http_info( &self, ) -> Result<ResponseContent<SensitiveDataScannerGetConfigResponse>, Error<ListScanningGroupsError>>

List all the Scanning groups in your organization.

Source

pub async fn list_standard_patterns( &self, ) -> Result<SensitiveDataScannerStandardPatternsResponseData, Error<ListStandardPatternsError>>

Returns all standard patterns.

Examples found in repository?
examples/v2_sensitive-data-scanner_ListStandardPatterns.rs (line 9)
6async fn main() {
7    let configuration = datadog::Configuration::new();
8    let api = SensitiveDataScannerAPI::with_config(configuration);
9    let resp = api.list_standard_patterns().await;
10    if let Ok(value) = resp {
11        println!("{:#?}", value);
12    } else {
13        println!("{:#?}", resp.unwrap_err());
14    }
15}
Source

pub async fn list_standard_patterns_with_http_info( &self, ) -> Result<ResponseContent<SensitiveDataScannerStandardPatternsResponseData>, Error<ListStandardPatternsError>>

Returns all standard patterns.

Source

pub async fn reorder_scanning_groups( &self, body: SensitiveDataScannerConfigRequest, ) -> Result<SensitiveDataScannerReorderGroupsResponse, Error<ReorderScanningGroupsError>>

Reorder the list of groups.

Examples found in repository?
examples/v2_sensitive-data-scanner_ReorderScanningGroups.rs (line 37)
14async fn main() {
15    // there is a valid "scanning_group" in the system
16    let group_data_id = std::env::var("GROUP_DATA_ID").unwrap();
17
18    // a valid "configuration" in the system
19    let configuration_data_id = std::env::var("CONFIGURATION_DATA_ID").unwrap();
20    let body = SensitiveDataScannerConfigRequest::new(
21        SensitiveDataScannerReorderConfig::new()
22            .id(configuration_data_id.clone())
23            .relationships(
24                SensitiveDataScannerConfigurationRelationships::new().groups(
25                    SensitiveDataScannerGroupList::new().data(vec![
26                        SensitiveDataScannerGroupItem::new()
27                            .id(group_data_id.clone())
28                            .type_(SensitiveDataScannerGroupType::SENSITIVE_DATA_SCANNER_GROUP),
29                    ]),
30                ),
31            )
32            .type_(SensitiveDataScannerConfigurationType::SENSITIVE_DATA_SCANNER_CONFIGURATIONS),
33        SensitiveDataScannerMetaVersionOnly::new(),
34    );
35    let configuration = datadog::Configuration::new();
36    let api = SensitiveDataScannerAPI::with_config(configuration);
37    let resp = api.reorder_scanning_groups(body).await;
38    if let Ok(value) = resp {
39        println!("{:#?}", value);
40    } else {
41        println!("{:#?}", resp.unwrap_err());
42    }
43}
Source

pub async fn reorder_scanning_groups_with_http_info( &self, body: SensitiveDataScannerConfigRequest, ) -> Result<ResponseContent<SensitiveDataScannerReorderGroupsResponse>, Error<ReorderScanningGroupsError>>

Reorder the list of groups.

Source

pub async fn update_scanning_group( &self, group_id: String, body: SensitiveDataScannerGroupUpdateRequest, ) -> Result<SensitiveDataScannerGroupUpdateResponse, Error<UpdateScanningGroupError>>

Update a group, including the order of the rules. Rules within the group are reordered by including a rules relationship. If the rules relationship is present, its data section MUST contain linkages for all of the rules currently in the group, and MUST NOT contain any others.

Examples found in repository?
examples/v2_sensitive-data-scanner_UpdateScanningGroup.rs (line 54)
18async fn main() {
19    // there is a valid "scanning_group" in the system
20    let group_data_id = std::env::var("GROUP_DATA_ID").unwrap();
21
22    // a valid "configuration" in the system
23    let configuration_data_id = std::env::var("CONFIGURATION_DATA_ID").unwrap();
24    let body =
25        SensitiveDataScannerGroupUpdateRequest::new(
26            SensitiveDataScannerGroupUpdate::new()
27                .attributes(
28                    SensitiveDataScannerGroupAttributes::new()
29                        .filter(SensitiveDataScannerFilter::new().query("*".to_string()))
30                        .is_enabled(false)
31                        .name("Example-Sensitive-Data-Scanner".to_string())
32                        .product_list(vec![SensitiveDataScannerProduct::LOGS]),
33                )
34                .id(group_data_id.clone())
35                .relationships(
36                    SensitiveDataScannerGroupRelationships::new()
37                        .configuration(
38                            SensitiveDataScannerConfigurationData
39                            ::new().data(
40                                SensitiveDataScannerConfiguration::new()
41                                    .id(configuration_data_id.clone())
42                                    .type_(
43                                        SensitiveDataScannerConfigurationType::SENSITIVE_DATA_SCANNER_CONFIGURATIONS,
44                                    ),
45                            ),
46                        )
47                        .rules(SensitiveDataScannerRuleData::new().data(vec![])),
48                )
49                .type_(SensitiveDataScannerGroupType::SENSITIVE_DATA_SCANNER_GROUP),
50            SensitiveDataScannerMetaVersionOnly::new(),
51        );
52    let configuration = datadog::Configuration::new();
53    let api = SensitiveDataScannerAPI::with_config(configuration);
54    let resp = api.update_scanning_group(group_data_id.clone(), body).await;
55    if let Ok(value) = resp {
56        println!("{:#?}", value);
57    } else {
58        println!("{:#?}", resp.unwrap_err());
59    }
60}
Source

pub async fn update_scanning_group_with_http_info( &self, group_id: String, body: SensitiveDataScannerGroupUpdateRequest, ) -> Result<ResponseContent<SensitiveDataScannerGroupUpdateResponse>, Error<UpdateScanningGroupError>>

Update a group, including the order of the rules. Rules within the group are reordered by including a rules relationship. If the rules relationship is present, its data section MUST contain linkages for all of the rules currently in the group, and MUST NOT contain any others.

Source

pub async fn update_scanning_rule( &self, rule_id: String, body: SensitiveDataScannerRuleUpdateRequest, ) -> Result<SensitiveDataScannerRuleUpdateResponse, Error<UpdateScanningRuleError>>

Update a scanning rule. The request body MUST NOT include a standard_pattern relationship, as that relationship is non-editable. Trying to edit the regex attribute of a rule with a standard_pattern relationship will also result in an error.

Examples found in repository?
examples/v2_sensitive-data-scanner_UpdateScanningRule.rs (line 43)
14async fn main() {
15    // the "scanning_group" has a "scanning_rule"
16    let rule_data_id = std::env::var("RULE_DATA_ID").unwrap();
17    let body = SensitiveDataScannerRuleUpdateRequest::new(
18        SensitiveDataScannerRuleUpdate::new()
19            .attributes(
20                SensitiveDataScannerRuleAttributes::new()
21                    .included_keyword_configuration(
22                        SensitiveDataScannerIncludedKeywordConfiguration::new(
23                            35,
24                            vec!["credit card".to_string(), "cc".to_string()],
25                        ),
26                    )
27                    .is_enabled(true)
28                    .name("Example-Sensitive-Data-Scanner".to_string())
29                    .pattern("pattern".to_string())
30                    .priority(5)
31                    .tags(vec!["sensitive_data:true".to_string()])
32                    .text_replacement(
33                        SensitiveDataScannerTextReplacement::new()
34                            .type_(SensitiveDataScannerTextReplacementType::NONE),
35                    ),
36            )
37            .id(rule_data_id.clone())
38            .type_(SensitiveDataScannerRuleType::SENSITIVE_DATA_SCANNER_RULE),
39        SensitiveDataScannerMetaVersionOnly::new(),
40    );
41    let configuration = datadog::Configuration::new();
42    let api = SensitiveDataScannerAPI::with_config(configuration);
43    let resp = api.update_scanning_rule(rule_data_id.clone(), body).await;
44    if let Ok(value) = resp {
45        println!("{:#?}", value);
46    } else {
47        println!("{:#?}", resp.unwrap_err());
48    }
49}
Source

pub async fn update_scanning_rule_with_http_info( &self, rule_id: String, body: SensitiveDataScannerRuleUpdateRequest, ) -> Result<ResponseContent<SensitiveDataScannerRuleUpdateResponse>, Error<UpdateScanningRuleError>>

Update a scanning rule. The request body MUST NOT include a standard_pattern relationship, as that relationship is non-editable. Trying to edit the regex attribute of a rule with a standard_pattern relationship will also result in an error.

Trait Implementations§

Source§

impl Clone for SensitiveDataScannerAPI

Source§

fn clone(&self) -> SensitiveDataScannerAPI

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

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

Performs copy-assignment from source. Read more
Source§

impl Debug for SensitiveDataScannerAPI

Source§

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

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

impl Default for SensitiveDataScannerAPI

Source§

fn default() -> Self

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

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> ErasedDestructor for T
where T: 'static,