pub struct Channel { /* private fields */ }
Available on crate feature
protocol
only.Expand description
A Channel is a set of batches that are split into at least one, but possibly multiple frames.
Frames are allowed to be ingested out of order.
Each frame is ingested one by one. Once a frame with closed
is added to the channel, the
channel may mark itself as ready for reading once all intervening frames have been added
Implementations§
Source§impl Channel
impl Channel
Sourcepub fn add_frame(
&mut self,
frame: Frame,
l1_inclusion_block: BlockInfo,
) -> Result<(), ChannelError>
pub fn add_frame( &mut self, frame: Frame, l1_inclusion_block: BlockInfo, ) -> Result<(), ChannelError>
Sourcepub const fn open_block_number(&self) -> u64
pub const fn open_block_number(&self) -> u64
Returns the block number of the L1 block that contained the first Frame in this channel.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Channel
impl RefUnwindSafe for Channel
impl Send for Channel
impl Sync for Channel
impl Unpin for Channel
impl UnwindSafe for Channel
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more