pub enum Value {
Show 17 variants
Bool {
val: bool,
internal_span: Span,
},
Int {
val: i64,
internal_span: Span,
},
Float {
val: f64,
internal_span: Span,
},
String {
val: String,
internal_span: Span,
},
Glob {
val: String,
no_expand: bool,
internal_span: Span,
},
Filesize {
val: i64,
internal_span: Span,
},
Duration {
val: i64,
internal_span: Span,
},
Date {
val: DateTime<FixedOffset>,
internal_span: Span,
},
Range {
val: Box<Range>,
internal_span: Span,
},
Record {
val: SharedCow<Record>,
internal_span: Span,
},
List {
vals: Vec<Value>,
internal_span: Span,
},
Closure {
val: Box<Closure>,
internal_span: Span,
},
Error {
error: Box<ShellError>,
internal_span: Span,
},
Binary {
val: Vec<u8>,
internal_span: Span,
},
CellPath {
val: CellPath,
internal_span: Span,
},
Custom {
val: Box<dyn CustomValue>,
internal_span: Span,
},
Nothing {
internal_span: Span,
},
}
Expand description
Core structured values that pass through the pipeline in Nushell.
Variants§
Bool
Int
Float
String
Glob
Filesize
Duration
Date
Range
Record
List
Closure
Error
Binary
CellPath
Custom
Nothing
Implementations§
Source§impl Value
impl Value
Sourcepub fn as_bool(&self) -> Result<bool, ShellError>
pub fn as_bool(&self) -> Result<bool, ShellError>
Returns the inner bool
value or an error if this Value
is not a bool
Sourcepub fn as_int(&self) -> Result<i64, ShellError>
pub fn as_int(&self) -> Result<i64, ShellError>
Returns the inner i64
value or an error if this Value
is not an int
Sourcepub fn as_float(&self) -> Result<f64, ShellError>
pub fn as_float(&self) -> Result<f64, ShellError>
Returns the inner f64
value or an error if this Value
is not a float
Sourcepub fn coerce_float(&self) -> Result<f64, ShellError>
pub fn coerce_float(&self) -> Result<f64, ShellError>
Returns this Value
converted to a f64
or an error if it cannot be converted
Only the following Value
cases will return an Ok
result:
Int
Float
for val in Value::test_values() {
assert_eq!(
matches!(val, Value::Float { .. } | Value::Int { .. }),
val.coerce_float().is_ok(),
);
}
Sourcepub fn as_filesize(&self) -> Result<i64, ShellError>
pub fn as_filesize(&self) -> Result<i64, ShellError>
Returns the inner i64
filesize value or an error if this Value
is not a filesize
Sourcepub fn as_duration(&self) -> Result<i64, ShellError>
pub fn as_duration(&self) -> Result<i64, ShellError>
Returns the inner i64
duration value or an error if this Value
is not a duration
Sourcepub fn as_date(&self) -> Result<DateTime<FixedOffset>, ShellError>
pub fn as_date(&self) -> Result<DateTime<FixedOffset>, ShellError>
Returns the inner DateTime
value or an error if this Value
is not a date
Sourcepub fn as_range(&self) -> Result<Range, ShellError>
pub fn as_range(&self) -> Result<Range, ShellError>
Returns a reference to the inner Range
value or an error if this Value
is not a range
Sourcepub fn into_range(self) -> Result<Range, ShellError>
pub fn into_range(self) -> Result<Range, ShellError>
Unwraps the inner Range
value or returns an error if this Value
is not a range
Sourcepub fn as_str(&self) -> Result<&str, ShellError>
pub fn as_str(&self) -> Result<&str, ShellError>
Returns a reference to the inner str
value or an error if this Value
is not a string
Sourcepub fn into_string(self) -> Result<String, ShellError>
pub fn into_string(self) -> Result<String, ShellError>
Unwraps the inner String
value or returns an error if this Value
is not a string
Sourcepub fn coerce_str(&self) -> Result<Cow<'_, str>, ShellError>
pub fn coerce_str(&self) -> Result<Cow<'_, str>, ShellError>
Returns this Value
converted to a str
or an error if it cannot be converted
Only the following Value
cases will return an Ok
result:
Int
Float
String
Glob
Binary
(only if valid utf-8)Date
for val in Value::test_values() {
assert_eq!(
matches!(
val,
Value::Int { .. }
| Value::Float { .. }
| Value::String { .. }
| Value::Glob { .. }
| Value::Binary { .. }
| Value::Date { .. }
),
val.coerce_str().is_ok(),
);
}
Sourcepub fn coerce_string(&self) -> Result<String, ShellError>
pub fn coerce_string(&self) -> Result<String, ShellError>
Returns this Value
converted to a String
or an error if it cannot be converted
§Note
This function is equivalent to value.coerce_str().map(Cow::into_owned)
which might allocate a new String
.
To avoid this allocation, prefer coerce_str
if you do not need an owned String
,
or coerce_into_string
if you do not need to keep the original Value
around.
Only the following Value
cases will return an Ok
result:
Int
Float
String
Glob
Binary
(only if valid utf-8)Date
for val in Value::test_values() {
assert_eq!(
matches!(
val,
Value::Int { .. }
| Value::Float { .. }
| Value::String { .. }
| Value::Glob { .. }
| Value::Binary { .. }
| Value::Date { .. }
),
val.coerce_string().is_ok(),
);
}
Sourcepub fn coerce_into_string(self) -> Result<String, ShellError>
pub fn coerce_into_string(self) -> Result<String, ShellError>
Returns this Value
converted to a String
or an error if it cannot be converted
Only the following Value
cases will return an Ok
result:
Int
Float
String
Glob
Binary
(only if valid utf-8)Date
for val in Value::test_values() {
assert_eq!(
matches!(
val,
Value::Int { .. }
| Value::Float { .. }
| Value::String { .. }
| Value::Glob { .. }
| Value::Binary { .. }
| Value::Date { .. }
),
val.coerce_into_string().is_ok(),
);
}
Sourcepub fn as_char(&self) -> Result<char, ShellError>
pub fn as_char(&self) -> Result<char, ShellError>
Returns this Value
as a char
or an error if it is not a single character string
Sourcepub fn to_path(&self) -> Result<PathBuf, ShellError>
pub fn to_path(&self) -> Result<PathBuf, ShellError>
Converts this Value
to a PathBuf
or returns an error if it is not a string
Sourcepub fn as_record(&self) -> Result<&Record, ShellError>
pub fn as_record(&self) -> Result<&Record, ShellError>
Returns a reference to the inner Record
value or an error if this Value
is not a record
Sourcepub fn into_record(self) -> Result<Record, ShellError>
pub fn into_record(self) -> Result<Record, ShellError>
Unwraps the inner Record
value or returns an error if this Value
is not a record
Sourcepub fn as_list(&self) -> Result<&[Value], ShellError>
pub fn as_list(&self) -> Result<&[Value], ShellError>
Returns a reference to the inner list slice or an error if this Value
is not a list
Sourcepub fn into_list(self) -> Result<Vec<Value>, ShellError>
pub fn into_list(self) -> Result<Vec<Value>, ShellError>
Unwraps the inner list Vec
or returns an error if this Value
is not a list
Sourcepub fn as_closure(&self) -> Result<&Closure, ShellError>
pub fn as_closure(&self) -> Result<&Closure, ShellError>
Returns a reference to the inner Closure
value or an error if this Value
is not a closure
Sourcepub fn into_closure(self) -> Result<Closure, ShellError>
pub fn into_closure(self) -> Result<Closure, ShellError>
Unwraps the inner Closure
value or returns an error if this Value
is not a closure
Sourcepub fn as_binary(&self) -> Result<&[u8], ShellError>
pub fn as_binary(&self) -> Result<&[u8], ShellError>
Returns a reference to the inner binary slice or an error if this Value
is not a binary value
Sourcepub fn into_binary(self) -> Result<Vec<u8>, ShellError>
pub fn into_binary(self) -> Result<Vec<u8>, ShellError>
Unwraps the inner binary Vec
or returns an error if this Value
is not a binary value
Sourcepub fn coerce_binary(&self) -> Result<&[u8], ShellError>
pub fn coerce_binary(&self) -> Result<&[u8], ShellError>
Returns this Value
as a u8
slice or an error if it cannot be converted
Prefer coerce_into_binary
if you do not need to keep the original Value
around.
Only the following Value
cases will return an Ok
result:
Binary
String
for val in Value::test_values() {
assert_eq!(
matches!(val, Value::Binary { .. } | Value::String { .. }),
val.coerce_binary().is_ok(),
);
}
Sourcepub fn coerce_into_binary(self) -> Result<Vec<u8>, ShellError>
pub fn coerce_into_binary(self) -> Result<Vec<u8>, ShellError>
Returns this Value
as a Vec<u8>
or an error if it cannot be converted
Only the following Value
cases will return an Ok
result:
Binary
String
for val in Value::test_values() {
assert_eq!(
matches!(val, Value::Binary { .. } | Value::String { .. }),
val.coerce_into_binary().is_ok(),
);
}
Sourcepub fn as_cell_path(&self) -> Result<&CellPath, ShellError>
pub fn as_cell_path(&self) -> Result<&CellPath, ShellError>
Returns a reference to the inner CellPath
value or an error if this Value
is not a cell path
Sourcepub fn into_cell_path(self) -> Result<CellPath, ShellError>
pub fn into_cell_path(self) -> Result<CellPath, ShellError>
Unwraps the inner CellPath
value or returns an error if this Value
is not a cell path
Sourcepub fn as_custom_value(&self) -> Result<&dyn CustomValue, ShellError>
pub fn as_custom_value(&self) -> Result<&dyn CustomValue, ShellError>
Returns a reference to the inner CustomValue
trait object or an error if this Value
is not a custom value
Sourcepub fn into_custom_value(self) -> Result<Box<dyn CustomValue>, ShellError>
pub fn into_custom_value(self) -> Result<Box<dyn CustomValue>, ShellError>
Unwraps the inner CustomValue
trait object or returns an error if this Value
is not a custom value
pub fn get_data_by_key(&self, name: &str) -> Option<Value>
Sourcepub fn to_expanded_string(&self, separator: &str, config: &Config) -> String
pub fn to_expanded_string(&self, separator: &str, config: &Config) -> String
Converts this Value
to a string according to the given Config
and separator
This functions recurses into records and lists,
returning a string that contains the stringified form of all nested Value
s.
Sourcepub fn to_abbreviated_string(&self, config: &Config) -> String
pub fn to_abbreviated_string(&self, config: &Config) -> String
Converts this Value
to a string according to the given Config
This functions does not recurse into records and lists. Instead, it will shorten the first list or record it finds like so:
- “[table {n} rows]”
- “[list {n} items]”
- “[record {n} fields]”
Sourcepub fn to_parsable_string(&self, separator: &str, config: &Config) -> String
pub fn to_parsable_string(&self, separator: &str, config: &Config) -> String
Converts this Value
to a string according to the given Config
and separator
This function adds quotes around strings,
so that the returned string can be parsed by nushell.
The other Value
cases are already parsable when converted strings
or are not yet handled by this function.
This functions behaves like to_expanded_string
and will recurse into records and lists.
Sourcepub fn to_debug_string(&self) -> String
pub fn to_debug_string(&self) -> String
Convert this Value
to a debug string
In general, this function should only be used for debug purposes, and the resulting string should not be displayed to the user (not even in an error).
Sourcepub fn follow_cell_path(
self,
cell_path: &[PathMember],
insensitive: bool,
) -> Result<Value, ShellError>
pub fn follow_cell_path( self, cell_path: &[PathMember], insensitive: bool, ) -> Result<Value, ShellError>
Follow a given cell path into the value: for example accessing select elements in a stream or list
Sourcepub fn upsert_cell_path(
&mut self,
cell_path: &[PathMember],
callback: Box<dyn FnOnce(&Value) -> Value>,
) -> Result<(), ShellError>
pub fn upsert_cell_path( &mut self, cell_path: &[PathMember], callback: Box<dyn FnOnce(&Value) -> Value>, ) -> Result<(), ShellError>
Follow a given cell path into the value: for example accessing select elements in a stream or list
pub fn upsert_data_at_cell_path( &mut self, cell_path: &[PathMember], new_val: Value, ) -> Result<(), ShellError>
Sourcepub fn update_cell_path<'a>(
&mut self,
cell_path: &[PathMember],
callback: Box<dyn FnOnce(&Value) -> Value + 'a>,
) -> Result<(), ShellError>
pub fn update_cell_path<'a>( &mut self, cell_path: &[PathMember], callback: Box<dyn FnOnce(&Value) -> Value + 'a>, ) -> Result<(), ShellError>
Follow a given cell path into the value: for example accessing select elements in a stream or list
pub fn update_data_at_cell_path( &mut self, cell_path: &[PathMember], new_val: Value, ) -> Result<(), ShellError>
pub fn remove_data_at_cell_path( &mut self, cell_path: &[PathMember], ) -> Result<(), ShellError>
pub fn insert_data_at_cell_path( &mut self, cell_path: &[PathMember], new_val: Value, head_span: Span, ) -> Result<(), ShellError>
Sourcepub fn recurse_mut<E>(
&mut self,
f: &mut impl FnMut(&mut Value) -> Result<(), E>,
) -> Result<(), E>
pub fn recurse_mut<E>( &mut self, f: &mut impl FnMut(&mut Value) -> Result<(), E>, ) -> Result<(), E>
Visits all values contained within the value (including this value) with a mutable reference given to the closure.
If the closure returns Err
, the traversal will stop.
Captures of closure values are currently visited, as they are values owned by the closure.
pub fn is_nothing(&self) -> bool
pub fn is_error(&self) -> bool
pub fn is_true(&self) -> bool
pub fn is_false(&self) -> bool
pub fn columns(&self) -> impl Iterator<Item = &String>
pub fn bool(val: bool, span: Span) -> Value
pub fn int(val: i64, span: Span) -> Value
pub fn float(val: f64, span: Span) -> Value
pub fn filesize(val: i64, span: Span) -> Value
pub fn duration(val: i64, span: Span) -> Value
pub fn date(val: DateTime<FixedOffset>, span: Span) -> Value
pub fn range(val: Range, span: Span) -> Value
pub fn string(val: impl Into<String>, span: Span) -> Value
pub fn glob(val: impl Into<String>, no_expand: bool, span: Span) -> Value
pub fn record(val: Record, span: Span) -> Value
pub fn list(vals: Vec<Value>, span: Span) -> Value
pub fn closure(val: Closure, span: Span) -> Value
pub fn error(error: ShellError, span: Span) -> Value
pub fn binary(val: impl Into<Vec<u8>>, span: Span) -> Value
pub fn cell_path(val: CellPath, span: Span) -> Value
pub fn custom(val: Box<dyn CustomValue>, span: Span) -> Value
Sourcepub fn test_bool(val: bool) -> Value
pub fn test_bool(val: bool) -> Value
Note: Only use this for test data, not live data, as it will point into unknown source when used in errors.
Sourcepub fn test_int(val: i64) -> Value
pub fn test_int(val: i64) -> Value
Note: Only use this for test data, not live data, as it will point into unknown source when used in errors.
Sourcepub fn test_float(val: f64) -> Value
pub fn test_float(val: f64) -> Value
Note: Only use this for test data, not live data, as it will point into unknown source when used in errors.
Sourcepub fn test_filesize(val: i64) -> Value
pub fn test_filesize(val: i64) -> Value
Note: Only use this for test data, not live data, as it will point into unknown source when used in errors.
Sourcepub fn test_duration(val: i64) -> Value
pub fn test_duration(val: i64) -> Value
Note: Only use this for test data, not live data, as it will point into unknown source when used in errors.
Sourcepub fn test_date(val: DateTime<FixedOffset>) -> Value
pub fn test_date(val: DateTime<FixedOffset>) -> Value
Note: Only use this for test data, not live data, as it will point into unknown source when used in errors.
Sourcepub fn test_range(val: Range) -> Value
pub fn test_range(val: Range) -> Value
Note: Only use this for test data, not live data, as it will point into unknown source when used in errors.
Sourcepub fn test_string(val: impl Into<String>) -> Value
pub fn test_string(val: impl Into<String>) -> Value
Note: Only use this for test data, not live data, as it will point into unknown source when used in errors.
Sourcepub fn test_glob(val: impl Into<String>) -> Value
pub fn test_glob(val: impl Into<String>) -> Value
Note: Only use this for test data, not live data, as it will point into unknown source when used in errors.
Sourcepub fn test_record(val: Record) -> Value
pub fn test_record(val: Record) -> Value
Note: Only use this for test data, not live data, as it will point into unknown source when used in errors.
Sourcepub fn test_list(vals: Vec<Value>) -> Value
pub fn test_list(vals: Vec<Value>) -> Value
Note: Only use this for test data, not live data, as it will point into unknown source when used in errors.
Sourcepub fn test_closure(val: Closure) -> Value
pub fn test_closure(val: Closure) -> Value
Note: Only use this for test data, not live data, as it will point into unknown source when used in errors.
Sourcepub fn test_nothing() -> Value
pub fn test_nothing() -> Value
Note: Only use this for test data, not live data, as it will point into unknown source when used in errors.
Sourcepub fn test_binary(val: impl Into<Vec<u8>>) -> Value
pub fn test_binary(val: impl Into<Vec<u8>>) -> Value
Note: Only use this for test data, not live data, as it will point into unknown source when used in errors.
Sourcepub fn test_cell_path(val: CellPath) -> Value
pub fn test_cell_path(val: CellPath) -> Value
Note: Only use this for test data, not live data, as it will point into unknown source when used in errors.
Sourcepub fn test_custom_value(val: Box<dyn CustomValue>) -> Value
pub fn test_custom_value(val: Box<dyn CustomValue>) -> Value
Note: Only use this for test data, not live data, as it will point into unknown source when used in errors.
Sourcepub fn test_values() -> Vec<Value>
pub fn test_values() -> Vec<Value>
Note: Only use this for test data, not live data, as it will point into unknown source when used in errors.
Returns a Vec
containing one of each value case (Value::Int
, Value::String
, etc.)
except for Value::CustomValue
.
Source§impl Value
impl Value
pub fn add( &self, op: Span, rhs: &Value, span: Span, ) -> Result<Value, ShellError>
pub fn append( &self, op: Span, rhs: &Value, span: Span, ) -> Result<Value, ShellError>
pub fn sub( &self, op: Span, rhs: &Value, span: Span, ) -> Result<Value, ShellError>
pub fn mul( &self, op: Span, rhs: &Value, span: Span, ) -> Result<Value, ShellError>
pub fn div( &self, op: Span, rhs: &Value, span: Span, ) -> Result<Value, ShellError>
pub fn modulo( &self, op: Span, rhs: &Value, span: Span, ) -> Result<Value, ShellError>
pub fn floor_div( &self, op: Span, rhs: &Value, span: Span, ) -> Result<Value, ShellError>
pub fn lt(&self, op: Span, rhs: &Value, span: Span) -> Result<Value, ShellError>
pub fn lte( &self, op: Span, rhs: &Value, span: Span, ) -> Result<Value, ShellError>
pub fn gt(&self, op: Span, rhs: &Value, span: Span) -> Result<Value, ShellError>
pub fn gte( &self, op: Span, rhs: &Value, span: Span, ) -> Result<Value, ShellError>
pub fn eq(&self, op: Span, rhs: &Value, span: Span) -> Result<Value, ShellError>
pub fn ne(&self, op: Span, rhs: &Value, span: Span) -> Result<Value, ShellError>
pub fn in(&self, op: Span, rhs: &Value, span: Span) -> Result<Value, ShellError>
pub fn not_in( &self, op: Span, rhs: &Value, span: Span, ) -> Result<Value, ShellError>
pub fn regex_match( &self, engine_state: &EngineState, op: Span, rhs: &Value, invert: bool, span: Span, ) -> Result<Value, ShellError>
pub fn starts_with( &self, op: Span, rhs: &Value, span: Span, ) -> Result<Value, ShellError>
pub fn ends_with( &self, op: Span, rhs: &Value, span: Span, ) -> Result<Value, ShellError>
pub fn bit_shl( &self, op: Span, rhs: &Value, span: Span, ) -> Result<Value, ShellError>
pub fn bit_shr( &self, op: Span, rhs: &Value, span: Span, ) -> Result<Value, ShellError>
pub fn bit_or( &self, op: Span, rhs: &Value, span: Span, ) -> Result<Value, ShellError>
pub fn bit_xor( &self, op: Span, rhs: &Value, span: Span, ) -> Result<Value, ShellError>
pub fn bit_and( &self, op: Span, rhs: &Value, span: Span, ) -> Result<Value, ShellError>
pub fn and( &self, op: Span, rhs: &Value, span: Span, ) -> Result<Value, ShellError>
pub fn or(&self, op: Span, rhs: &Value, span: Span) -> Result<Value, ShellError>
pub fn xor( &self, op: Span, rhs: &Value, span: Span, ) -> Result<Value, ShellError>
pub fn pow( &self, op: Span, rhs: &Value, span: Span, ) -> Result<Value, ShellError>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Value
impl<'de> Deserialize<'de> for Value
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl FromValue for Value
impl FromValue for Value
Source§fn from_value(v: Value) -> Result<Self, ShellError>
fn from_value(v: Value) -> Result<Self, ShellError>
Source§fn expected_type() -> Type
fn expected_type() -> Type
Value
type. Read moreAuto Trait Implementations§
impl Freeze for Value
impl !RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl !UnwindSafe for Value
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
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>
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<V> IntoPipelineData for V
impl<V> IntoPipelineData for V
fn into_pipeline_data(self) -> PipelineData
fn into_pipeline_data_with_metadata( self, metadata: impl Into<Option<PipelineMetadata>>, ) -> PipelineData
Source§impl<T> IntoSpanned for T
impl<T> IntoSpanned for T
Source§impl<D> OwoColorize for D
impl<D> OwoColorize for D
Source§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Source§fn black(&self) -> FgColorDisplay<'_, Black, Self>
fn black(&self) -> FgColorDisplay<'_, Black, Self>
Source§fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
Source§fn red(&self) -> FgColorDisplay<'_, Red, Self>
fn red(&self) -> FgColorDisplay<'_, Red, Self>
Source§fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
Source§fn green(&self) -> FgColorDisplay<'_, Green, Self>
fn green(&self) -> FgColorDisplay<'_, Green, Self>
Source§fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
Source§fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
Source§fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
Source§fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
Source§fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
Source§fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
Source§fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
Source§fn white(&self) -> FgColorDisplay<'_, White, Self>
fn white(&self) -> FgColorDisplay<'_, White, Self>
Source§fn on_white(&self) -> BgColorDisplay<'_, White, Self>
fn on_white(&self) -> BgColorDisplay<'_, White, Self>
Source§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Source§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Source§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Source§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Source§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Source§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Source§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Source§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Source§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Source§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Source§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Source§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Source§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Source§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Source§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Source§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Source§fn bold(&self) -> BoldDisplay<'_, Self>
fn bold(&self) -> BoldDisplay<'_, Self>
Source§fn dimmed(&self) -> DimDisplay<'_, Self>
fn dimmed(&self) -> DimDisplay<'_, Self>
Source§fn italic(&self) -> ItalicDisplay<'_, Self>
fn italic(&self) -> ItalicDisplay<'_, Self>
Source§fn underline(&self) -> UnderlineDisplay<'_, Self>
fn underline(&self) -> UnderlineDisplay<'_, Self>
Source§fn blink(&self) -> BlinkDisplay<'_, Self>
fn blink(&self) -> BlinkDisplay<'_, Self>
Source§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Source§fn reversed(&self) -> ReversedDisplay<'_, Self>
fn reversed(&self) -> ReversedDisplay<'_, Self>
Source§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Source§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg
or
a color-specific method, such as OwoColorize::green
, Read moreSource§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg
or
a color-specific method, such as OwoColorize::on_yellow
, Read moreSource§fn fg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>
Source§fn bg_rgb<const R: u8, const G: u8, const B: u8>(
&self,
) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>
Source§fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>
Source§fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
Source§impl<T> TryIntoValue for Twhere
T: IntoValue,
impl<T> TryIntoValue for Twhere
T: IntoValue,
Source§fn try_into_value(self, span: Span) -> Result<Value, ShellError>
fn try_into_value(self, span: Span) -> Result<Value, ShellError>
Value
.