pub struct BlockFetcher<'b> { /* private fields */ }
Expand description
Block Fetcher Stream like (Async Iterator) object
call next()
to get the next received block
Implementations§
Source§impl<'b> BlockFetcher<'b>
impl<'b> BlockFetcher<'b>
Sourcepub async fn next(&mut self) -> Result<Option<SerializedBlock>, ProtocolError>
pub async fn next(&mut self) -> Result<Option<SerializedBlock>, ProtocolError>
Get the next received block if still have some, otherwise return None, or a protocol error if something unexpected happen.
Auto Trait Implementations§
impl<'b> Freeze for BlockFetcher<'b>
impl<'b> RefUnwindSafe for BlockFetcher<'b>
impl<'b> Send for BlockFetcher<'b>
impl<'b> Sync for BlockFetcher<'b>
impl<'b> Unpin for BlockFetcher<'b>
impl<'b> !UnwindSafe for BlockFetcher<'b>
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