pub struct Channel<P: Protocol> { /* private fields */ }
Implementations§
Source§impl Channel<BlockFetch>
impl Channel<BlockFetch>
Sourcepub async fn request_range<'b>(
&'b mut self,
from: Point,
to: Point,
) -> Result<Option<BlockFetcher<'b>>, ProtocolError>
pub async fn request_range<'b>( &'b mut self, from: Point, to: Point, ) -> Result<Option<BlockFetcher<'b>>, ProtocolError>
Perform the BlockFetch RequestRange
sub protocol with the opposite side
Return a BlockFetcher which is a
Source§impl Channel<ChainSync>
impl Channel<ChainSync>
Sourcepub async fn intersect(
&mut self,
points: Vec<Point>,
) -> Result<ChainIntersection, ProtocolError>
pub async fn intersect( &mut self, points: Vec<Point>, ) -> Result<ChainIntersection, ProtocolError>
Perform the Chainsync FindIntersect
sub protocol packet with the opposite side
pub async fn get_tip(&mut self) -> Result<Tip, ProtocolError>
Auto Trait Implementations§
impl<P> Freeze for Channel<P>
impl<P> RefUnwindSafe for Channel<P>where
P: RefUnwindSafe,
impl<P> Send for Channel<P>where
P: Send,
impl<P> Sync for Channel<P>where
P: Sync,
impl<P> Unpin for Channel<P>where
P: Unpin,
impl<P> UnwindSafe for Channel<P>where
P: UnwindSafe,
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