[][src]Enum nu_protocol::Type

pub enum Type {
    Nothing,
    Int,
    Range(Box<RangeType>),
    Decimal,
    Filesize,
    String,
    Line,
    ColumnPath,
    Pattern,
    Boolean,
    Date,
    Duration,
    Path,
    Binary,
    Row(Row),
    Table(Vec<Type>),
    Block,
    Error,
    BeginningOfStream,
    EndOfStream,
}

Representation of for the type of a value in Nu

Variants

Nothing

A value which has no value

Int

An integer-based value

Range(Box<RangeType>)

A range between two values

Decimal

A decimal (floating point) value

Filesize

A filesize in bytes

String

A string of text

Line

A line of text (a string with trailing line ending)

ColumnPath

A path through a table

Pattern

A glob pattern (like foo*)

Boolean

A boolean value

Date

A date value (in UTC)

Duration

A data duration value

Path

A filepath value

Binary

A binary (non-text) buffer value

Row(Row)

A row of data

Table(Vec<Type>)

A full table of data

Block

A block of script (TODO)

Error

An error value (TODO)

BeginningOfStream

Beginning of stream marker (used as bookend markers rather than actual values)

EndOfStream

End of stream marker (used as bookend markers rather than actual values)

Implementations

impl Type[src]

pub fn from_primitive(primitive: &Primitive) -> Type[src]

Convert a Primitive into its corresponding Type

pub fn from_dictionary(dictionary: &Dictionary) -> Type[src]

Convert a dictionary into its corresponding row Type

pub fn from_table<'a>(table: impl IntoIterator<Item = &'a Value>) -> Type[src]

Convert a table into its corresponding Type

pub fn from_value<'a>(value: impl Into<&'a UntaggedValue>) -> Type[src]

Convert a value into its corresponding Type

Trait Implementations

impl Clone for Type[src]

impl Debug for Type[src]

impl<'de> Deserialize<'de> for Type[src]

impl Eq for Type[src]

impl Hash for Type[src]

impl Ord for Type[src]

impl PartialEq<Type> for Type[src]

impl PartialOrd<Type> for Type[src]

impl PrettyDebug for Type[src]

fn pretty(&self) -> DebugDocBuilder[src]

Prepare Type for pretty-printing

impl Serialize for Type[src]

impl StructuralEq for Type[src]

impl StructuralPartialEq for Type[src]

Auto Trait Implementations

impl RefUnwindSafe for Type

impl Send for Type

impl Sync for Type

impl Unpin for Type

impl UnwindSafe for Type

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> PrettyDebugWithSource for T where
    T: PrettyDebug
[src]

impl<T> SpannedItem for T[src]

impl<T> TaggedItem for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.