Struct ax_banyan::StreamBuilder
source · pub struct StreamBuilder<T: TreeTypes, V> { /* private fields */ }
Expand description
A builder for a stream of trees
Most of the logic except for handling the empty case is implemented in the forest
Implementations§
source§impl<T: TreeTypes, V> StreamBuilder<T, V>
impl<T: TreeTypes, V> StreamBuilder<T, V>
pub fn new(config: Config, secrets: Secrets) -> Self
sourcepub fn debug() -> Self
pub fn debug() -> Self
Creates a stream builder with debug settings.
The tree config will be the debug config that produces “interesting” trees even with a small number of elements.
The secrets will be the default secrets
Do not use this in production!
pub fn snapshot(&self) -> Tree<T, V>
pub fn link(&self) -> Option<T::Link>
pub fn as_index_ref(&self) -> Option<&Index<T>>
pub fn level(&self) -> i32
sourcepub fn transaction(&mut self) -> StreamTransaction<'_, T, V>
pub fn transaction(&mut self) -> StreamTransaction<'_, T, V>
Modify a StreamBuilder and roll back the changes if the operation was not successful
Note that consumed offets are not rolled back to make sure we don’t reuse offsets.
Trait Implementations§
source§impl<T: TreeTypes, V> Debug for StreamBuilder<T, V>
impl<T: TreeTypes, V> Debug for StreamBuilder<T, V>
Auto Trait Implementations§
impl<T, V> RefUnwindSafe for StreamBuilder<T, V>where
V: RefUnwindSafe,
<T as TreeTypes>::KeySeq: RefUnwindSafe,
<T as TreeTypes>::Link: RefUnwindSafe,
<T as TreeTypes>::SummarySeq: RefUnwindSafe,
impl<T, V> Send for StreamBuilder<T, V>where
V: Send,
impl<T, V> Sync for StreamBuilder<T, V>where
V: Sync,
impl<T, V> Unpin for StreamBuilder<T, V>where
V: Unpin,
impl<T, V> UnwindSafe for StreamBuilder<T, V>where
V: UnwindSafe,
<T as TreeTypes>::KeySeq: RefUnwindSafe,
<T as TreeTypes>::Link: RefUnwindSafe,
<T as TreeTypes>::SummarySeq: RefUnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more