#[non_exhaustive]pub struct IndexField {Show 13 fields
pub index_field_name: String,
pub index_field_type: IndexFieldType,
pub int_options: Option<IntOptions>,
pub double_options: Option<DoubleOptions>,
pub literal_options: Option<LiteralOptions>,
pub text_options: Option<TextOptions>,
pub date_options: Option<DateOptions>,
pub lat_lon_options: Option<LatLonOptions>,
pub int_array_options: Option<IntArrayOptions>,
pub double_array_options: Option<DoubleArrayOptions>,
pub literal_array_options: Option<LiteralArrayOptions>,
pub text_array_options: Option<TextArrayOptions>,
pub date_array_options: Option<DateArrayOptions>,
}
Expand description
Configuration information for a field in the index, including its name, type, and options. The supported options depend on the
.IndexFieldType
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.index_field_name: String
A string that represents the name of an index field. CloudSearch supports regular index fields as well as dynamic fields. A dynamic field's name defines a pattern that begins or ends with a wildcard. Any document fields that don't map to a regular index field but do match a dynamic field's pattern are configured with the dynamic field's indexing options.
Regular field names begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore). Dynamic field names must begin or end with a wildcard (*). The wildcard can also be the only character in a dynamic field name. Multiple wildcards, and wildcards embedded within a string are not supported.
The name score
is reserved and cannot be used as a field name. To reference a document's ID, you can use the name _id
.
index_field_type: IndexFieldType
The type of field. The valid options for a field depend on the field type. For more information about the supported field types, see Configuring Index Fields in the Amazon CloudSearch Developer Guide.
int_options: Option<IntOptions>
Options for a 64-bit signed integer field. Present if IndexFieldType
specifies the field is of type int
. All options are enabled by default.
double_options: Option<DoubleOptions>
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.
literal_options: Option<LiteralOptions>
Options for literal field. Present if IndexFieldType
specifies the field is of type literal
. All options are enabled by default.
text_options: Option<TextOptions>
Options for text field. Present if IndexFieldType
specifies the field is of type text
. A text
field is always searchable. All options are enabled by default.
date_options: Option<DateOptions>
Options for a date field. Dates and times are specified in UTC (Coordinated Universal Time) according to IETF RFC3339: yyyy-mm-ddT00:00:00Z. Present if IndexFieldType
specifies the field is of type date
. All options are enabled by default.
lat_lon_options: Option<LatLonOptions>
Options for a latlon field. A latlon field contains a location stored as a latitude and longitude value pair. Present if IndexFieldType
specifies the field is of type latlon
. All options are enabled by default.
int_array_options: Option<IntArrayOptions>
Options for a field that contains an array of 64-bit signed integers. Present if IndexFieldType
specifies the field is of type int-array
. All options are enabled by default.
double_array_options: Option<DoubleArrayOptions>
Options for a field that contains an array of double-precision 64-bit floating point values. Present if IndexFieldType
specifies the field is of type double-array
. All options are enabled by default.
literal_array_options: Option<LiteralArrayOptions>
Options for a field that contains an array of literal strings. Present if IndexFieldType
specifies the field is of type literal-array
. All options are enabled by default.
text_array_options: Option<TextArrayOptions>
Options for a field that contains an array of text strings. Present if IndexFieldType
specifies the field is of type text-array
. A text-array
field is always searchable. All options are enabled by default.
date_array_options: Option<DateArrayOptions>
Options for a field that contains an array of dates. Present if IndexFieldType
specifies the field is of type date-array
. All options are enabled by default.
Implementations§
Source§impl IndexField
impl IndexField
Sourcepub fn index_field_name(&self) -> &str
pub fn index_field_name(&self) -> &str
A string that represents the name of an index field. CloudSearch supports regular index fields as well as dynamic fields. A dynamic field's name defines a pattern that begins or ends with a wildcard. Any document fields that don't map to a regular index field but do match a dynamic field's pattern are configured with the dynamic field's indexing options.
Regular field names begin with a letter and can contain the following characters: a-z (lowercase), 0-9, and _ (underscore). Dynamic field names must begin or end with a wildcard (*). The wildcard can also be the only character in a dynamic field name. Multiple wildcards, and wildcards embedded within a string are not supported.
The name score
is reserved and cannot be used as a field name. To reference a document's ID, you can use the name _id
.
Sourcepub fn index_field_type(&self) -> &IndexFieldType
pub fn index_field_type(&self) -> &IndexFieldType
The type of field. The valid options for a field depend on the field type. For more information about the supported field types, see Configuring Index Fields in the Amazon CloudSearch Developer Guide.
Sourcepub fn int_options(&self) -> Option<&IntOptions>
pub fn int_options(&self) -> Option<&IntOptions>
Options for a 64-bit signed integer field. Present if IndexFieldType
specifies the field is of type int
. All options are enabled by default.
Sourcepub fn double_options(&self) -> Option<&DoubleOptions>
pub fn double_options(&self) -> Option<&DoubleOptions>
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.
Sourcepub fn literal_options(&self) -> Option<&LiteralOptions>
pub fn literal_options(&self) -> Option<&LiteralOptions>
Options for literal field. Present if IndexFieldType
specifies the field is of type literal
. All options are enabled by default.
Sourcepub fn text_options(&self) -> Option<&TextOptions>
pub fn text_options(&self) -> Option<&TextOptions>
Options for text field. Present if IndexFieldType
specifies the field is of type text
. A text
field is always searchable. All options are enabled by default.
Sourcepub fn date_options(&self) -> Option<&DateOptions>
pub fn date_options(&self) -> Option<&DateOptions>
Options for a date field. Dates and times are specified in UTC (Coordinated Universal Time) according to IETF RFC3339: yyyy-mm-ddT00:00:00Z. Present if IndexFieldType
specifies the field is of type date
. All options are enabled by default.
Sourcepub fn lat_lon_options(&self) -> Option<&LatLonOptions>
pub fn lat_lon_options(&self) -> Option<&LatLonOptions>
Options for a latlon field. A latlon field contains a location stored as a latitude and longitude value pair. Present if IndexFieldType
specifies the field is of type latlon
. All options are enabled by default.
Sourcepub fn int_array_options(&self) -> Option<&IntArrayOptions>
pub fn int_array_options(&self) -> Option<&IntArrayOptions>
Options for a field that contains an array of 64-bit signed integers. Present if IndexFieldType
specifies the field is of type int-array
. All options are enabled by default.
Sourcepub fn double_array_options(&self) -> Option<&DoubleArrayOptions>
pub fn double_array_options(&self) -> Option<&DoubleArrayOptions>
Options for a field that contains an array of double-precision 64-bit floating point values. Present if IndexFieldType
specifies the field is of type double-array
. All options are enabled by default.
Sourcepub fn literal_array_options(&self) -> Option<&LiteralArrayOptions>
pub fn literal_array_options(&self) -> Option<&LiteralArrayOptions>
Options for a field that contains an array of literal strings. Present if IndexFieldType
specifies the field is of type literal-array
. All options are enabled by default.
Sourcepub fn text_array_options(&self) -> Option<&TextArrayOptions>
pub fn text_array_options(&self) -> Option<&TextArrayOptions>
Options for a field that contains an array of text strings. Present if IndexFieldType
specifies the field is of type text-array
. A text-array
field is always searchable. All options are enabled by default.
Sourcepub fn date_array_options(&self) -> Option<&DateArrayOptions>
pub fn date_array_options(&self) -> Option<&DateArrayOptions>
Options for a field that contains an array of dates. Present if IndexFieldType
specifies the field is of type date-array
. All options are enabled by default.
Source§impl IndexField
impl IndexField
Sourcepub fn builder() -> IndexFieldBuilder
pub fn builder() -> IndexFieldBuilder
Creates a new builder-style object to manufacture IndexField
.
Trait Implementations§
Source§impl Clone for IndexField
impl Clone for IndexField
Source§fn clone(&self) -> IndexField
fn clone(&self) -> IndexField
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for IndexField
impl Debug for IndexField
Source§impl PartialEq for IndexField
impl PartialEq for IndexField
impl StructuralPartialEq for IndexField
Auto Trait Implementations§
impl Freeze for IndexField
impl RefUnwindSafe for IndexField
impl Send for IndexField
impl Sync for IndexField
impl Unpin for IndexField
impl UnwindSafe for IndexField
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);