[−][src]Struct carrier::channel::Channel
Fields
debug_id: String
Methods
impl Channel
[src]
pub fn new<S: Into<String>>(noise: Transport, debug_id: S) -> Self
[src]
pub fn bytes_in_flight(&self) -> usize
[src]
pub fn window(&self) -> usize
[src]
pub fn is_initiator(&self) -> bool
[src]
pub fn recv(&mut self, pkt: EncryptedPacket) -> Result<(), Error>
[src]
receive a packet from the wire
pub fn handle_loss(&mut self, loss: LossDetection)
[src]
pub fn progress(&mut self) -> Result<ChannelProgress, Error>
[src]
progress the channel and return something that happened this needs to be polled until it returns Later or Disconnectd
pub fn stream<M: Into<Vec<u8>>>(&mut self, stream: u32, msg: M)
[src]
queue a message
pub fn open<M: Into<Vec<u8>>>(
&mut self,
payload: M,
are_we_initiator: bool
) -> u32
[src]
&mut self,
payload: M,
are_we_initiator: bool
) -> u32
open a new stream, given a header
pub fn header<M: Into<Vec<u8>>>(&mut self, stream: u32, payload: M)
[src]
send headers (as a response)
pub fn close(&mut self, stream: u32)
[src]
queue a close, stream may still be able to receive (this is half close)
pub fn remove(&mut self, stream: u32)
[src]
remove a stream (full close)
pub fn disconnect(&mut self) -> Result<Vec<u8>, Error>
[src]
create a disconnect packet
pub fn probe(&mut self)
[src]
send probe packets
pub fn config(&mut self, config: Config)
[src]
configure network
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Same for T
type Output = T
Should always be Self