pub struct Conn<IO: IntoHalves + 'static> {
pub ev_rx: Receiver<Ev>,
pub max_frame_size: usize,
/* private fields */
}Fields§
§ev_rx: Receiver<Ev>§max_frame_size: usizeImplementations§
source§impl<IO: IntoHalves> Conn<IO>
impl<IO: IntoHalves> Conn<IO>
pub fn new(config: Rc<Config>, io: IO) -> Self
pub async fn write_frame( &mut self, frame: Frame, payload: impl IntoPiece ) -> Result<()>
pub async fn write_settings(&mut self, settings: Settings) -> Result<()>
sourcepub async fn wait_for_frame(
&mut self,
types: impl Into<BitFlags<FrameT>>
) -> FrameWaitOutcome
pub async fn wait_for_frame( &mut self, types: impl Into<BitFlags<FrameT>> ) -> FrameWaitOutcome
Waits for a certain kind of frame
pub async fn handshake(&mut self) -> Result<()>
pub async fn send(&mut self, buf: impl Into<Piece>) -> Result<()>
pub fn encode_headers(&mut self, headers: &Headers) -> Result<Piece>
pub async fn write_headers( &mut self, block_fragment: Piece, stream_id: StreamId, flags: impl Into<BitFlags<HeadersFlags>> ) -> Result<()>
pub async fn write_data( &mut self, stream_id: StreamId, end_stream: bool, data: impl Into<Piece> ) -> Result<()>
Auto Trait Implementations§
impl<IO> Freeze for Conn<IO>
impl<IO> !RefUnwindSafe for Conn<IO>
impl<IO> !Send for Conn<IO>
impl<IO> !Sync for Conn<IO>
impl<IO> Unpin for Conn<IO>
impl<IO> !UnwindSafe for Conn<IO>
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