Struct aws_sdk_ec2::model::VCpuInfo

source ·
#[non_exhaustive]
pub struct VCpuInfo { /* private fields */ }
Expand description

Describes the vCPU configurations for the instance type.

Implementations§

The default number of vCPUs for the instance type.

The default number of cores for the instance type.

The default number of threads per core for the instance type.

The valid number of cores that can be configured for the instance type.

The valid number of threads per core that can be configured for the instance type.

Creates a new builder-style object to manufacture VCpuInfo.

Examples found in repository?
src/xml_deser.rs (line 59648)
59644
59645
59646
59647
59648
59649
59650
59651
59652
59653
59654
59655
59656
59657
59658
59659
59660
59661
59662
59663
59664
59665
59666
59667
59668
59669
59670
59671
59672
59673
59674
59675
59676
59677
59678
59679
59680
59681
59682
59683
59684
59685
59686
59687
59688
59689
59690
59691
59692
59693
59694
59695
59696
59697
59698
59699
59700
59701
59702
59703
59704
59705
59706
59707
59708
59709
59710
59711
59712
59713
59714
59715
59716
59717
59718
59719
59720
pub fn deser_structure_crate_model_v_cpu_info(
    decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VCpuInfo, aws_smithy_xml::decode::XmlDecodeError> {
    #[allow(unused_mut)]
    let mut builder = crate::model::VCpuInfo::builder();
    while let Some(mut tag) = decoder.next_tag() {
        match tag.start_el() {
            s if s.matches("defaultVCpus") /* DefaultVCpus com.amazonaws.ec2#VCpuInfo$DefaultVCpus */ =>  {
                let var_2904 =
                    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#VCpuCount`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_default_v_cpus(var_2904);
            }
            ,
            s if s.matches("defaultCores") /* DefaultCores com.amazonaws.ec2#VCpuInfo$DefaultCores */ =>  {
                let var_2905 =
                    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#CoreCount`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_default_cores(var_2905);
            }
            ,
            s if s.matches("defaultThreadsPerCore") /* DefaultThreadsPerCore com.amazonaws.ec2#VCpuInfo$DefaultThreadsPerCore */ =>  {
                let var_2906 =
                    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#ThreadsPerCore`)"))
                        }
                        ?
                    )
                ;
                builder = builder.set_default_threads_per_core(var_2906);
            }
            ,
            s if s.matches("validCores") /* ValidCores com.amazonaws.ec2#VCpuInfo$ValidCores */ =>  {
                let var_2907 =
                    Some(
                        crate::xml_deser::deser_list_com_amazonaws_ec2_core_count_list(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_valid_cores(var_2907);
            }
            ,
            s if s.matches("validThreadsPerCore") /* ValidThreadsPerCore com.amazonaws.ec2#VCpuInfo$ValidThreadsPerCore */ =>  {
                let var_2908 =
                    Some(
                        crate::xml_deser::deser_list_com_amazonaws_ec2_threads_per_core_list(&mut tag)
                        ?
                    )
                ;
                builder = builder.set_valid_threads_per_core(var_2908);
            }
            ,
            _ => {}
        }
    }
    Ok(builder.build())
}

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

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

Calls U::from(self).

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

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more