pub struct StringFormatFlags(/* private fields */);Expand description
Format flags used by the StringPush op
This is the bytecode counterpart to koto_parser::StringFormatOptions.
Implementations§
Source§impl StringFormatFlags
impl StringFormatFlags
Sourcepub const FILL_CHARACTER: u8 = 16u8
pub const FILL_CHARACTER: u8 = 16u8
Set to true when a fill character is defined
Sourcepub const REPRESENTATION: u8 = 32u8
pub const REPRESENTATION: u8 = 32u8
Set to true when a format style is defined
Sourcepub fn alignment(&self) -> StringAlignment
pub fn alignment(&self) -> StringAlignment
Returns the flag’s string alignment
Sourcepub fn has_min_width(&self) -> bool
pub fn has_min_width(&self) -> bool
True if a minimum width has been defined
Sourcepub fn has_precision(&self) -> bool
pub fn has_precision(&self) -> bool
True if a precision has been defined
Sourcepub fn has_fill_character(&self) -> bool
pub fn has_fill_character(&self) -> bool
True if a fill character has been defined
Sourcepub fn has_representation(&self) -> bool
pub fn has_representation(&self) -> bool
True if an alternative representation has been defined
Trait Implementations§
Source§impl Clone for StringFormatFlags
impl Clone for StringFormatFlags
Source§fn clone(&self) -> StringFormatFlags
fn clone(&self) -> StringFormatFlags
Returns a duplicate 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 Default for StringFormatFlags
impl Default for StringFormatFlags
Source§fn default() -> StringFormatFlags
fn default() -> StringFormatFlags
Returns the “default value” for a type. Read more
Source§impl From<StringFormatFlags> for u8
impl From<StringFormatFlags> for u8
Source§fn from(value: StringFormatFlags) -> Self
fn from(value: StringFormatFlags) -> Self
Converts to this type from the input type.
Source§impl From<StringFormatOptions> for StringFormatFlags
impl From<StringFormatOptions> for StringFormatFlags
Source§fn from(value: StringFormatOptions) -> Self
fn from(value: StringFormatOptions) -> Self
Converts to this type from the input type.
Source§impl TryFrom<u8> for StringFormatFlags
impl TryFrom<u8> for StringFormatFlags
impl Copy for StringFormatFlags
Auto Trait Implementations§
impl Freeze for StringFormatFlags
impl RefUnwindSafe for StringFormatFlags
impl Send for StringFormatFlags
impl Sync for StringFormatFlags
impl Unpin for StringFormatFlags
impl UnwindSafe for StringFormatFlags
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