Struct repr::row::RowArena[][src]

pub struct RowArena {
    inner: RefCell<Vec<Vec<u8>>>,
}
Expand description

RowArena is used to hold on to temporary Rows for functions like eval that need to create complex Datums but don’t have a Row to put them in yet.

Fields

inner: RefCell<Vec<Vec<u8>>>

Implementations

Take ownership of bytes for the lifetime of the arena.

Take ownership of string for the lifetime of the arena.

Take ownership of row for the lifetime of the arena, returning a reference to the first datum in the row.

If we had an owned datum type, this method would be much clearer, and would be called push_owned_datum.

Convenience function to make a new Row containing a single datum, and take ownership of it for the lifetime of the arena

let arena = RowArena::new();
let datum = arena.make_datum(|packer| {
  packer.push_list(&[Datum::String("hello"), Datum::String("world")]);
});
assert_eq!(datum.unwrap_list().iter().collect::<Vec<_>>(), vec![Datum::String("hello"), Datum::String("world")]);

Like RowArena::make_datum, but the provided closure can return an error.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. 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

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more