Struct Configuration

Source
#[non_exhaustive]
pub struct Configuration { pub server_index: usize, pub server_variables: HashMap<String, String>, pub server_operation_index: HashMap<String, usize>, pub server_operation_variables: HashMap<String, HashMap<String, String>>, pub proxy_url: Option<String>, pub enable_retry: bool, pub max_retries: u32, /* private fields */ }

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.
§server_index: usize§server_variables: HashMap<String, String>§server_operation_index: HashMap<String, usize>§server_operation_variables: HashMap<String, HashMap<String, String>>§proxy_url: Option<String>§enable_retry: bool§max_retries: u32

Implementations§

Source§

impl Configuration

Source

pub fn new() -> Self

Examples found in repository?
examples/v1_users_ListUsers.rs (line 7)
6async fn main() {
7    let configuration = datadog::Configuration::new();
8    let api = UsersAPI::with_config(configuration);
9    let resp = api.list_users().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/v1_ip-ranges_GetIPRanges.rs (line 7)
6async fn main() {
7    let configuration = datadog::Configuration::new();
8    let api = IPRangesAPI::with_config(configuration);
9    let resp = api.get_ip_ranges().await;
10    if let Ok(value) = resp {
11        println!("{:#?}", value);
12    } else {
13        println!("{:#?}", resp.unwrap_err());
14    }
15}
examples/v2_roles_ListPermissions.rs (line 7)
6async fn main() {
7    let configuration = datadog::Configuration::new();
8    let api = RolesAPI::with_config(configuration);
9    let resp = api.list_permissions().await;
10    if let Ok(value) = resp {
11        println!("{:#?}", value);
12    } else {
13        println!("{:#?}", resp.unwrap_err());
14    }
15}
examples/v1_authentication_Validate.rs (line 7)
6async fn main() {
7    let configuration = datadog::Configuration::new();
8    let api = AuthenticationAPI::with_config(configuration);
9    let resp = api.validate().await;
10    if let Ok(value) = resp {
11        println!("{:#?}", value);
12    } else {
13        println!("{:#?}", resp.unwrap_err());
14    }
15}
examples/v1_organizations_ListOrgs.rs (line 7)
6async fn main() {
7    let configuration = datadog::Configuration::new();
8    let api = OrganizationsAPI::with_config(configuration);
9    let resp = api.list_orgs().await;
10    if let Ok(value) = resp {
11        println!("{:#?}", value);
12    } else {
13        println!("{:#?}", resp.unwrap_err());
14    }
15}
examples/v2_rum_GetRUMApplications.rs (line 7)
6async fn main() {
7    let configuration = datadog::Configuration::new();
8    let api = RUMAPI::with_config(configuration);
9    let resp = api.get_rum_applications().await;
10    if let Ok(value) = resp {
11        println!("{:#?}", value);
12    } else {
13        println!("{:#?}", resp.unwrap_err());
14    }
15}
Source

pub fn get_operation_host(&self, operation_str: &str) -> String

Source

pub fn set_unstable_operation_enabled( &mut self, operation: &str, enabled: bool, ) -> bool

Examples found in repository?
examples/v2_aws-integration_ListAWSNamespaces.rs (line 8)
6async fn main() {
7    let mut configuration = datadog::Configuration::new();
8    configuration.set_unstable_operation_enabled("v2.ListAWSNamespaces", true);
9    let api = AWSIntegrationAPI::with_config(configuration);
10    let resp = api.list_aws_namespaces().await;
11    if let Ok(value) = resp {
12        println!("{:#?}", value);
13    } else {
14        println!("{:#?}", resp.unwrap_err());
15    }
16}
More examples
Hide additional examples
examples/v2_aws-integration_ListAWSNamespaces_3031307873.rs (line 8)
6async fn main() {
7    let mut configuration = datadog::Configuration::new();
8    configuration.set_unstable_operation_enabled("v2.ListAWSNamespaces", true);
9    let api = AWSIntegrationAPI::with_config(configuration);
10    let resp = api.list_aws_namespaces().await;
11    if let Ok(value) = resp {
12        println!("{:#?}", value);
13    } else {
14        println!("{:#?}", resp.unwrap_err());
15    }
16}
examples/v2_aws-logs-integration_ListAWSLogsServices.rs (line 9)
7async fn main() {
8    let mut configuration = datadog::Configuration::new();
9    configuration.set_unstable_operation_enabled("v2.ListAWSLogsServices", true);
10    let api = AWSLogsIntegrationAPI::with_config(configuration);
11    let resp = api.list_aws_logs_services().await;
12    if let Ok(value) = resp {
13        println!("{:#?}", value);
14    } else {
15        println!("{:#?}", resp.unwrap_err());
16    }
17}
examples/v2_monitors_ListMonitorUserTemplates.rs (line 8)
6async fn main() {
7    let mut configuration = datadog::Configuration::new();
8    configuration.set_unstable_operation_enabled("v2.ListMonitorUserTemplates", true);
9    let api = MonitorsAPI::with_config(configuration);
10    let resp = api.list_monitor_user_templates().await;
11    if let Ok(value) = resp {
12        println!("{:#?}", value);
13    } else {
14        println!("{:#?}", resp.unwrap_err());
15    }
16}
examples/v2_aws-integration_CreateNewAWSExternalID.rs (line 8)
6async fn main() {
7    let mut configuration = datadog::Configuration::new();
8    configuration.set_unstable_operation_enabled("v2.CreateNewAWSExternalID", true);
9    let api = AWSIntegrationAPI::with_config(configuration);
10    let resp = api.create_new_aws_external_id().await;
11    if let Ok(value) = resp {
12        println!("{:#?}", value);
13    } else {
14        println!("{:#?}", resp.unwrap_err());
15    }
16}
examples/v2_aws-integration_CreateNewAWSExternalID_364713854.rs (line 8)
6async fn main() {
7    let mut configuration = datadog::Configuration::new();
8    configuration.set_unstable_operation_enabled("v2.CreateNewAWSExternalID", true);
9    let api = AWSIntegrationAPI::with_config(configuration);
10    let resp = api.create_new_aws_external_id().await;
11    if let Ok(value) = resp {
12        println!("{:#?}", value);
13    } else {
14        println!("{:#?}", resp.unwrap_err());
15    }
16}
Source

pub fn is_unstable_operation_enabled(&self, operation: &str) -> bool

Source

pub fn is_unstable_operation(&self, operation: &str) -> bool

Source

pub fn set_auth_key(&mut self, operation_str: &str, api_key: APIKey)

Source

pub fn set_proxy_url(&mut self, proxy_url: Option<String>)

Source

pub fn set_retry(&mut self, enable_retry: bool, max_retries: u32)

Trait Implementations§

Source§

impl Clone for Configuration

Source§

fn clone(&self) -> Configuration

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 Configuration

Source§

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

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

impl Default for Configuration

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,