pub struct BlockWriter { /* private fields */ }Expand description
Writer: collects ledgers into a block and flushes the block when it is full.
Implementations§
Source§impl BlockWriter
impl BlockWriter
Sourcepub fn create(
dir: &Path,
first: u32,
block_ledgers: u32,
level: i32,
dict: Option<Vec<u8>>,
) -> Result<BlockWriter, String>
pub fn create( dir: &Path, first: u32, block_ledgers: u32, level: i32, dict: Option<Vec<u8>>, ) -> Result<BlockWriter, String>
A new segment starting at ledger first.
pub fn append(&mut self, sequence: u32, ledger: Vec<u8>) -> Result<(), String>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BlockWriter
impl RefUnwindSafe for BlockWriter
impl Send for BlockWriter
impl Sync for BlockWriter
impl Unpin for BlockWriter
impl UnsafeUnpin for BlockWriter
impl UnwindSafe for BlockWriter
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].