Struct repr::row::RowArena [−][src]
Expand description
RowArena
is used to hold on to temporary Row
s for functions like eval
that need to create complex Datum
s 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
Auto Trait Implementations
impl !RefUnwindSafe for RowArena
impl UnwindSafe for RowArena
Blanket Implementations
Mutably borrows from an owned value. Read more
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