pub enum ArrValue {
    Bytes(BytesArray),
    Lazy(LazyArray),
    Expr(ExprArray),
    Eager(EagerArray),
    Extended(Cc<ExtendedArray>),
    Range(RangeArray),
    Slice(Cc<SliceArray>),
    Reverse(Cc<ReverseArray>),
    Mapped(MappedArray),
    Repeated(RepeatedArray),
}
Expand description

Represents a Jsonnet array value.

Variants§

§

Bytes(BytesArray)

Layout optimized byte array.

§

Lazy(LazyArray)

Every element is lazy evaluated.

§

Expr(ExprArray)

Every element is defined somewhere in source code

§

Eager(EagerArray)

Every field is already evaluated.

§

Extended(Cc<ExtendedArray>)

Concatenation of two arrays of any kind.

§

Range(RangeArray)

Represents a integer array in form [start, start + 1, ... end - 1, end]. This kind of arrays is generated by std.range(start, end) call, and used for loops.

§

Slice(Cc<SliceArray>)

Sliced array view.

§

Reverse(Cc<ReverseArray>)

Reversed array view. Returned by std.reverse(other) call

§

Mapped(MappedArray)

Returned by std.map call

§

Repeated(RepeatedArray)

Returned by std.repeat call

Implementations§

Array length.

Is array contains no elements?

Get array element by index, evaluating it, if it is lazy.

Returns None on out-of-bounds condition.

Get array element by index, without evaluation.

Returns None on out-of-bounds condition.

Return a reversed view on current array.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
Converts to this type from the input type.
Creates a value from an iterator. Read more
Define how to visit values referred by this value. Read more
Whether this type should be tracked by the collector. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.