Struct aws_sdk_ec2::model::LaunchTemplateCpuOptions
source · #[non_exhaustive]pub struct LaunchTemplateCpuOptions { /* private fields */ }
Expand description
The CPU options for the instance.
Implementations§
source§impl LaunchTemplateCpuOptions
impl LaunchTemplateCpuOptions
sourcepub fn core_count(&self) -> Option<i32>
pub fn core_count(&self) -> Option<i32>
The number of CPU cores for the instance.
sourcepub fn threads_per_core(&self) -> Option<i32>
pub fn threads_per_core(&self) -> Option<i32>
The number of threads per CPU core.
source§impl LaunchTemplateCpuOptions
impl LaunchTemplateCpuOptions
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture LaunchTemplateCpuOptions
.
Examples found in repository?
src/xml_deser.rs (line 52967)
52963 52964 52965 52966 52967 52968 52969 52970 52971 52972 52973 52974 52975 52976 52977 52978 52979 52980 52981 52982 52983 52984 52985 52986 52987 52988 52989 52990 52991 52992 52993 52994 52995 52996 52997 52998 52999 53000 53001 53002 53003 53004
pub fn deser_structure_crate_model_launch_template_cpu_options(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LaunchTemplateCpuOptions, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::LaunchTemplateCpuOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("coreCount") /* CoreCount com.amazonaws.ec2#LaunchTemplateCpuOptions$CoreCount */ => {
let var_2527 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_core_count(var_2527);
}
,
s if s.matches("threadsPerCore") /* ThreadsPerCore com.amazonaws.ec2#LaunchTemplateCpuOptions$ThreadsPerCore */ => {
let var_2528 =
Some(
{
<i32 as aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_threads_per_core(var_2528);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for LaunchTemplateCpuOptions
impl Clone for LaunchTemplateCpuOptions
source§fn clone(&self) -> LaunchTemplateCpuOptions
fn clone(&self) -> LaunchTemplateCpuOptions
Returns a copy 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 more