Struct aws_sdk_ec2::model::inference_accelerator_info::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for InferenceAcceleratorInfo
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn accelerators(self, input: InferenceDeviceInfo) -> Self
pub fn accelerators(self, input: InferenceDeviceInfo) -> Self
Appends an item to accelerators
.
To override the contents of this collection use set_accelerators
.
Describes the Inference accelerators for the instance type.
sourcepub fn set_accelerators(self, input: Option<Vec<InferenceDeviceInfo>>) -> Self
pub fn set_accelerators(self, input: Option<Vec<InferenceDeviceInfo>>) -> Self
Describes the Inference accelerators for the instance type.
Examples found in repository?
src/xml_deser.rs (line 60174)
60160 60161 60162 60163 60164 60165 60166 60167 60168 60169 60170 60171 60172 60173 60174 60175 60176 60177 60178 60179 60180 60181
pub fn deser_structure_crate_model_inference_accelerator_info(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InferenceAcceleratorInfo, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::InferenceAcceleratorInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("accelerators") /* Accelerators com.amazonaws.ec2#InferenceAcceleratorInfo$Accelerators */ => {
let var_2935 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_inference_device_info_list(&mut tag)
?
)
;
builder = builder.set_accelerators(var_2935);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> InferenceAcceleratorInfo
pub fn build(self) -> InferenceAcceleratorInfo
Consumes the builder and constructs a InferenceAcceleratorInfo
.
Examples found in repository?
src/xml_deser.rs (line 60180)
60160 60161 60162 60163 60164 60165 60166 60167 60168 60169 60170 60171 60172 60173 60174 60175 60176 60177 60178 60179 60180 60181
pub fn deser_structure_crate_model_inference_accelerator_info(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InferenceAcceleratorInfo, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::InferenceAcceleratorInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("accelerators") /* Accelerators com.amazonaws.ec2#InferenceAcceleratorInfo$Accelerators */ => {
let var_2935 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_inference_device_info_list(&mut tag)
?
)
;
builder = builder.set_accelerators(var_2935);
}
,
_ => {}
}
}
Ok(builder.build())
}