#[non_exhaustive]pub struct FastlyServiceRequest {
pub data: FastlyServiceData,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Payload schema for Fastly service requests.
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.data: FastlyServiceData
Data object for Fastly service requests.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl FastlyServiceRequest
impl FastlyServiceRequest
Sourcepub fn new(data: FastlyServiceData) -> FastlyServiceRequest
pub fn new(data: FastlyServiceData) -> FastlyServiceRequest
Examples found in repository?
examples/v2_fastly-integration_CreateFastlyService.rs (lines 11-17)
10async fn main() {
11 let body = FastlyServiceRequest::new(
12 FastlyServiceData::new("abc123".to_string(), FastlyServiceType::FASTLY_SERVICES)
13 .attributes(
14 FastlyServiceAttributes::new()
15 .tags(vec!["myTag".to_string(), "myTag2:myValue".to_string()]),
16 ),
17 );
18 let configuration = datadog::Configuration::new();
19 let api = FastlyIntegrationAPI::with_config(configuration);
20 let resp = api
21 .create_fastly_service("account_id".to_string(), body)
22 .await;
23 if let Ok(value) = resp {
24 println!("{:#?}", value);
25 } else {
26 println!("{:#?}", resp.unwrap_err());
27 }
28}
More examples
examples/v2_fastly-integration_UpdateFastlyService.rs (lines 11-17)
10async fn main() {
11 let body = FastlyServiceRequest::new(
12 FastlyServiceData::new("abc123".to_string(), FastlyServiceType::FASTLY_SERVICES)
13 .attributes(
14 FastlyServiceAttributes::new()
15 .tags(vec!["myTag".to_string(), "myTag2:myValue".to_string()]),
16 ),
17 );
18 let configuration = datadog::Configuration::new();
19 let api = FastlyIntegrationAPI::with_config(configuration);
20 let resp = api
21 .update_fastly_service("account_id".to_string(), "service_id".to_string(), body)
22 .await;
23 if let Ok(value) = resp {
24 println!("{:#?}", value);
25 } else {
26 println!("{:#?}", resp.unwrap_err());
27 }
28}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for FastlyServiceRequest
impl Clone for FastlyServiceRequest
Source§fn clone(&self) -> FastlyServiceRequest
fn clone(&self) -> FastlyServiceRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for FastlyServiceRequest
impl Debug for FastlyServiceRequest
Source§impl<'de> Deserialize<'de> for FastlyServiceRequest
impl<'de> Deserialize<'de> for FastlyServiceRequest
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
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 FastlyServiceRequest
impl PartialEq for FastlyServiceRequest
Source§impl Serialize for FastlyServiceRequest
impl Serialize for FastlyServiceRequest
impl StructuralPartialEq for FastlyServiceRequest
Auto Trait Implementations§
impl Freeze for FastlyServiceRequest
impl RefUnwindSafe for FastlyServiceRequest
impl Send for FastlyServiceRequest
impl Sync for FastlyServiceRequest
impl Unpin for FastlyServiceRequest
impl UnwindSafe for FastlyServiceRequest
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