Struct aws_sdk_ec2::model::GpuDeviceInfo
source · #[non_exhaustive]pub struct GpuDeviceInfo { /* private fields */ }
Expand description
Describes the GPU accelerators for the instance type.
Implementations§
source§impl GpuDeviceInfo
impl GpuDeviceInfo
sourcepub fn manufacturer(&self) -> Option<&str>
pub fn manufacturer(&self) -> Option<&str>
The manufacturer of the GPU accelerator.
sourcepub fn memory_info(&self) -> Option<&GpuDeviceMemoryInfo>
pub fn memory_info(&self) -> Option<&GpuDeviceMemoryInfo>
Describes the memory available to the GPU accelerator.
source§impl GpuDeviceInfo
impl GpuDeviceInfo
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture GpuDeviceInfo
.
Examples found in repository?
src/xml_deser.rs (line 68970)
68966 68967 68968 68969 68970 68971 68972 68973 68974 68975 68976 68977 68978 68979 68980 68981 68982 68983 68984 68985 68986 68987 68988 68989 68990 68991 68992 68993 68994 68995 68996 68997 68998 68999 69000 69001 69002 69003 69004 69005 69006 69007 69008 69009 69010 69011 69012 69013 69014 69015 69016 69017 69018 69019 69020 69021 69022 69023 69024 69025 69026 69027 69028
pub fn deser_structure_crate_model_gpu_device_info(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::GpuDeviceInfo, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::GpuDeviceInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("name") /* Name com.amazonaws.ec2#GpuDeviceInfo$Name */ => {
let var_3400 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_name(var_3400);
}
,
s if s.matches("manufacturer") /* Manufacturer com.amazonaws.ec2#GpuDeviceInfo$Manufacturer */ => {
let var_3401 =
Some(
Result::<std::string::String, aws_smithy_xml::decode::XmlDecodeError>::Ok(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_manufacturer(var_3401);
}
,
s if s.matches("count") /* Count com.amazonaws.ec2#GpuDeviceInfo$Count */ => {
let var_3402 =
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#GpuDeviceCount`)"))
}
?
)
;
builder = builder.set_count(var_3402);
}
,
s if s.matches("memoryInfo") /* MemoryInfo com.amazonaws.ec2#GpuDeviceInfo$MemoryInfo */ => {
let var_3403 =
Some(
crate::xml_deser::deser_structure_crate_model_gpu_device_memory_info(&mut tag)
?
)
;
builder = builder.set_memory_info(var_3403);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for GpuDeviceInfo
impl Clone for GpuDeviceInfo
source§fn clone(&self) -> GpuDeviceInfo
fn clone(&self) -> GpuDeviceInfo
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