Struct icu::list::ListFormatterOptions
source · #[non_exhaustive]pub struct ListFormatterOptions {
pub length: Option<ListLength>,
}
Expand description
A list of options set by the developer to adjust the behavior of the ListFormatter.
§Examples
use icu::list::{ListFormatterOptions, ListLength};
let options = ListFormatterOptions::default().with_length(ListLength::Wide);
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.length: Option<ListLength>
The length variant should reflect available space for the list.
Implementations§
source§impl ListFormatterOptions
impl ListFormatterOptions
sourcepub const fn default() -> ListFormatterOptions
pub const fn default() -> ListFormatterOptions
Constructs a new ListFormatterOptions
struct.
sourcepub const fn with_length(self, length: ListLength) -> ListFormatterOptions
pub const fn with_length(self, length: ListLength) -> ListFormatterOptions
Auguments the struct with the set ListLength
.
Trait Implementations§
source§impl Clone for ListFormatterOptions
impl Clone for ListFormatterOptions
source§fn clone(&self) -> ListFormatterOptions
fn clone(&self) -> ListFormatterOptions
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 moresource§impl Debug for ListFormatterOptions
impl Debug for ListFormatterOptions
source§impl Default for ListFormatterOptions
impl Default for ListFormatterOptions
source§fn default() -> ListFormatterOptions
fn default() -> ListFormatterOptions
Returns the “default value” for a type. Read more
source§impl From<BaseStyle> for ListFormatterOptions
impl From<BaseStyle> for ListFormatterOptions
source§fn from(style: BaseStyle) -> ListFormatterOptions
fn from(style: BaseStyle) -> ListFormatterOptions
Converts to this type from the input type.
source§impl PartialEq for ListFormatterOptions
impl PartialEq for ListFormatterOptions
impl Copy for ListFormatterOptions
impl Eq for ListFormatterOptions
impl StructuralPartialEq for ListFormatterOptions
Auto Trait Implementations§
impl Freeze for ListFormatterOptions
impl RefUnwindSafe for ListFormatterOptions
impl Send for ListFormatterOptions
impl Sync for ListFormatterOptions
impl Unpin for ListFormatterOptions
impl UnwindSafe for ListFormatterOptions
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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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>
Converts
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>
Converts
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 more