Struct nu_protocol::value::Value [−][src]
pub struct Value {
pub value: UntaggedValue,
pub tag: Tag,
}
Expand description
The fundamental structured value that flows through the pipeline, with associated metadata
Fields
value: UntaggedValue
tag: Tag
Implementations
Helper to create a Value
Get the corresponding anchor (originating location) for the Value
Get the name (url, filepath, etc) behind an anchor for the Value
View the Value as a string, if possible
View the Value as a FilePath (PathBuf), if possible
View the Value as a Int, if possible
View the Value as a Int, if possible
View the Value as a Filesize (u64), if possible
View the Value as a Duration (BigInt), if possible
View the Value as a Decimal (BigDecimal), if possible
View a Primitive::Binary as a Vec
View into the borrowed string contents of a Value, if possible
View the Value as a path, if possible
View the Value as a Primitive value, if possible
View the Value as a Primitive value, if possible
View the Value as char, if possible
View the Value as unsigned size, if possible
View the Value as unsigned 64-bit, if possible
View the Value as signed 64-bit, if possible
View the Value as unsigned 32-bit, if possible
View the Value as signed 32-bit, if possible
View the Value as signed 16-bit, if possible
View the Value as signed 32-bit float, if possible
View the Value as signed 64-bit float, if possible
View the Value as boolean, if possible
pub fn table_entries(&self) -> TableValueIter<'_>ⓘNotable traits for TableValueIter<'a>impl<'a> Iterator for TableValueIter<'a> type Item = &'a Value;
pub fn table_entries(&self) -> TableValueIter<'_>ⓘNotable traits for TableValueIter<'a>impl<'a> Iterator for TableValueIter<'a> type Item = &'a Value;
impl<'a> Iterator for TableValueIter<'a> type Item = &'a Value;
Returns an iterator of the values rows
pub fn row_entries(&self) -> RowValueIter<'_>ⓘNotable traits for RowValueIter<'a>impl<'a> Iterator for RowValueIter<'a> type Item = (&'a String, &'a Value);
pub fn row_entries(&self) -> RowValueIter<'_>ⓘNotable traits for RowValueIter<'a>impl<'a> Iterator for RowValueIter<'a> type Item = (&'a String, &'a Value);
impl<'a> Iterator for RowValueIter<'a> type Item = (&'a String, &'a Value);
Returns an iterator of the value’s cells
Methods from Deref<Target = UntaggedValue>
Get the corresponding descriptors (column names) associated with this value
Returns true if this value represents a filesize
Returns true if this value represents a duration
Expect this value to be an error and return it
Expect this value to be a string and return it
Expect this value to be an integer and return it
Trait Implementations
Overload deferencing to give back the UntaggedValue inside of a Value
type Target = UntaggedValue
type Target = UntaggedValue
The resulting type after dereferencing.
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>,
Deserialize this value from the given Serde deserializer. Read more
Convert a borrowed Value into a borrowed UntaggedValue
Convert a builder into a tagged Value
Convert an UntaggedValue into a Value with a default tag
Convert a Value into an UntaggedValue
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Get a borrowed Value ready to be pretty-printed
A convenience method that prints out the document without colors in 70 columns. Generally, you should use plain_string or colored_string if possible, but display() can be useful for trace lines and things like that, where you don’t have control over the terminal. Read more
Get a Value ready to be pretty-printed
A convenience method that prints out the document without colors in 70 columns. Generally, you should use plain_string or colored_string if possible, but display() can be useful for trace lines and things like that, where you don’t have control over the terminal. Read more
type Error = ShellError
type Error = ShellError
The type returned in the event of a conversion error.
type Error = ShellError
type Error = ShellError
The type returned in the event of a conversion error.
type Error = ShellError
type Error = ShellError
The type returned in the event of a conversion error.
Convert to a dictionary, if possible
type Error = ShellError
type Error = ShellError
The type returned in the event of a conversion error.
Auto Trait Implementations
impl RefUnwindSafe for Value
impl UnwindSafe for Value
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.