Skip to main content

AsLiquidArray

Trait AsLiquidArray 

Source
pub trait AsLiquidArray {
    // Required methods
    fn as_string_array_opt(&self) -> Option<&LiquidByteArray>;
    fn as_binary_array_opt(&self) -> Option<&LiquidByteArray>;
    fn as_byte_view_array_opt(
        &self,
    ) -> Option<&LiquidByteViewArray<MemoryBuffer>>;
    fn as_primitive_array_opt<T: LiquidPrimitiveType>(
        &self,
    ) -> Option<&LiquidPrimitiveArray<T>>;
    fn as_float_array_opt<T: LiquidFloatType>(
        &self,
    ) -> Option<&LiquidFloatArray<T>>;

    // Provided methods
    fn as_string(&self) -> &LiquidByteArray { ... }
    fn as_binary(&self) -> &LiquidByteArray { ... }
    fn as_byte_view(&self) -> &LiquidByteViewArray<MemoryBuffer> { ... }
    fn as_primitive<T: LiquidPrimitiveType>(&self) -> &LiquidPrimitiveArray<T> { ... }
    fn as_float<T: LiquidFloatType>(&self) -> &LiquidFloatArray<T> { ... }
}
Expand description

A trait to access the underlying Liquid array.

Required Methods§

Source

fn as_string_array_opt(&self) -> Option<&LiquidByteArray>

Get the underlying string array.

Source

fn as_binary_array_opt(&self) -> Option<&LiquidByteArray>

Get the underlying binary array.

Source

fn as_byte_view_array_opt(&self) -> Option<&LiquidByteViewArray<MemoryBuffer>>

Get the underlying byte view array.

Source

fn as_primitive_array_opt<T: LiquidPrimitiveType>( &self, ) -> Option<&LiquidPrimitiveArray<T>>

Get the underlying primitive array.

Source

fn as_float_array_opt<T: LiquidFloatType>(&self) -> Option<&LiquidFloatArray<T>>

Get the underlying float array.

Provided Methods§

Source

fn as_string(&self) -> &LiquidByteArray

Get the underlying string array.

Source

fn as_binary(&self) -> &LiquidByteArray

Get the underlying binary array.

Source

fn as_byte_view(&self) -> &LiquidByteViewArray<MemoryBuffer>

Get the underlying byte view array.

Source

fn as_primitive<T: LiquidPrimitiveType>(&self) -> &LiquidPrimitiveArray<T>

Get the underlying primitive array.

Source

fn as_float<T: LiquidFloatType>(&self) -> &LiquidFloatArray<T>

Get the underlying float array.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§