Struct aws_sdk_cloudsearch::model::DoubleOptions
source · #[non_exhaustive]pub struct DoubleOptions { /* private fields */ }Expand description
Options for a double-precision 64-bit floating point field. Present if IndexFieldType specifies the field is of type double. All options are enabled by default.
Implementations§
source§impl DoubleOptions
impl DoubleOptions
sourcepub fn default_value(&self) -> Option<f64>
pub fn default_value(&self) -> Option<f64>
A value to use for the field if the field isn't specified for a document. This can be important if you are using the field in an expression and that field is not present in every document.
sourcepub fn source_field(&self) -> Option<&str>
pub fn source_field(&self) -> Option<&str>
The name of the source field to map to the field.
sourcepub fn facet_enabled(&self) -> Option<bool>
pub fn facet_enabled(&self) -> Option<bool>
Whether facet information can be returned for the field.
sourcepub fn search_enabled(&self) -> Option<bool>
pub fn search_enabled(&self) -> Option<bool>
Whether the contents of the field are searchable.
sourcepub fn return_enabled(&self) -> Option<bool>
pub fn return_enabled(&self) -> Option<bool>
Whether the contents of the field can be returned in the search results.
sourcepub fn sort_enabled(&self) -> Option<bool>
pub fn sort_enabled(&self) -> Option<bool>
Whether the field can be used to sort the search results.
source§impl DoubleOptions
impl DoubleOptions
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture DoubleOptions.
Examples found in repository?
src/xml_deser.rs (line 3024)
3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119
pub fn deser_structure_crate_model_double_options(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DoubleOptions, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::DoubleOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("DefaultValue") /* DefaultValue com.amazonaws.cloudsearch#DoubleOptions$DefaultValue */ => {
let var_116 =
Some(
{
<f64 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 (double: `com.amazonaws.cloudsearch#Double`)"))
}
?
)
;
builder = builder.set_default_value(var_116);
}
,
s if s.matches("SourceField") /* SourceField com.amazonaws.cloudsearch#DoubleOptions$SourceField */ => {
let var_117 =
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_source_field(var_117);
}
,
s if s.matches("FacetEnabled") /* FacetEnabled com.amazonaws.cloudsearch#DoubleOptions$FacetEnabled */ => {
let var_118 =
Some(
{
<bool 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 (boolean: `com.amazonaws.cloudsearch#Boolean`)"))
}
?
)
;
builder = builder.set_facet_enabled(var_118);
}
,
s if s.matches("SearchEnabled") /* SearchEnabled com.amazonaws.cloudsearch#DoubleOptions$SearchEnabled */ => {
let var_119 =
Some(
{
<bool 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 (boolean: `com.amazonaws.cloudsearch#Boolean`)"))
}
?
)
;
builder = builder.set_search_enabled(var_119);
}
,
s if s.matches("ReturnEnabled") /* ReturnEnabled com.amazonaws.cloudsearch#DoubleOptions$ReturnEnabled */ => {
let var_120 =
Some(
{
<bool 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 (boolean: `com.amazonaws.cloudsearch#Boolean`)"))
}
?
)
;
builder = builder.set_return_enabled(var_120);
}
,
s if s.matches("SortEnabled") /* SortEnabled com.amazonaws.cloudsearch#DoubleOptions$SortEnabled */ => {
let var_121 =
Some(
{
<bool 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 (boolean: `com.amazonaws.cloudsearch#Boolean`)"))
}
?
)
;
builder = builder.set_sort_enabled(var_121);
}
,
_ => {}
}
}
Ok(builder.build())
}Trait Implementations§
source§impl Clone for DoubleOptions
impl Clone for DoubleOptions
source§fn clone(&self) -> DoubleOptions
fn clone(&self) -> DoubleOptions
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