pub enum Value<'a> {
    Text(Text<Cow<'a, str>>),
    Bytes(Text<Base64Display<'a>>),
    Constant(Cow<'a, str>),
    Array(Array<Value<'a>>),
    Function(Function<'a>),
    Env(Env<'a>),
    IndexOps(IndexOps<'a>),
}
Expand description

A PSL value representation.

Variants§

§

Text(Text<Cow<'a, str>>)

A string value, quoted and escaped accordingly.

§

Bytes(Text<Base64Display<'a>>)

A byte value, quoted and base64-encoded.

§

Constant(Cow<'a, str>)

A constant value without quoting.

§

Array(Array<Value<'a>>)

An array of values.

§

Function(Function<'a>)

A function has a name, and optionally named parameters.

§

Env(Env<'a>)

A value can be read from the environment.

§

IndexOps(IndexOps<'a>)

An index ops definition.

Trait Implementations§

source§

impl<'a> Debug for Value<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a> Display for Value<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a> From<&'a [u8]> for Value<'a>

source§

fn from(bytes: &'a [u8]) -> Self

Converts to this type from the input type.
source§

impl<'a> From<&'a GeneratorConfigValue> for Value<'a>

source§

fn from(value: &'a GeneratorConfigValue) -> Self

Converts to this type from the input type.
source§

impl<'a> From<&'a str> for Value<'a>

source§

fn from(s: &'a str) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Array<Value<'a>>> for Value<'a>

source§

fn from(t: Array<Value<'a>>) -> Self

Converts to this type from the input type.
source§

impl<'a, T> From<Constant<T>> for Value<'a>where T: Display,

source§

fn from(c: Constant<T>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Env<'a>> for Value<'a>

source§

fn from(t: Env<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Function<'a>> for Value<'a>

source§

fn from(t: Function<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<IndexOps<'a>> for Value<'a>

source§

fn from(ops: IndexOps<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Text<Cow<'a, str>>> for Value<'a>

source§

fn from(t: Text<Cow<'a, str>>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Value<'a>> for FunctionParam<'a>

source§

fn from(v: Value<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Vec<Value<'a>>> for Value<'a>

source§

fn from(vec: Vec<Value<'a>>) -> Self

Converts to this type from the input type.
source§

impl<'a> From<Vec<u8>> for Value<'a>

source§

fn from(bytes: Vec<u8>) -> Self

Converts to this type from the input type.
source§

impl<'a> FromIterator<Value<'a>> for Value<'a>

source§

fn from_iter<T: IntoIterator<Item = Value<'a>>>(iter: T) -> Self

Creates a value from an iterator. Read more

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for Value<'a>

§

impl<'a> Send for Value<'a>

§

impl<'a> Sync for Value<'a>

§

impl<'a> Unpin for Value<'a>

§

impl<'a> UnwindSafe for Value<'a>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.