Struct Config
pub struct Config(/* private fields */);
Available on crate feature
yamux
only.Expand description
The yamux configuration.
Implementations§
§impl Config
impl Config
pub fn client() -> Config
👎Deprecated: Will be removed with the next breaking release.
pub fn client() -> Config
Creates a new YamuxConfig
in client mode, regardless of whether
it will be used for an inbound or outbound upgrade.
pub fn server() -> Config
👎Deprecated: Will be removed with the next breaking release.
pub fn server() -> Config
Creates a new YamuxConfig
in server mode, regardless of whether
it will be used for an inbound or outbound upgrade.
pub fn set_receive_window_size(&mut self, num_bytes: u32) -> &mut Config
👎Deprecated: Will be replaced in the next breaking release with a connection receive window size limit.
pub fn set_receive_window_size(&mut self, num_bytes: u32) -> &mut Config
Sets the size (in bytes) of the receive window per substream.
pub fn set_max_buffer_size(&mut self, num_bytes: usize) -> &mut Config
👎Deprecated: Will be removed with the next breaking release.
pub fn set_max_buffer_size(&mut self, num_bytes: usize) -> &mut Config
Sets the maximum size (in bytes) of the receive buffer per substream.
pub fn set_max_num_streams(&mut self, num_streams: usize) -> &mut Config
pub fn set_max_num_streams(&mut self, num_streams: usize) -> &mut Config
Sets the maximum number of concurrent substreams.
pub fn set_window_update_mode(&mut self, mode: WindowUpdateMode) -> &mut Config
👎Deprecated: WindowUpdate::OnRead
is the default. WindowUpdate::OnReceive
breaks backpressure, is thus not recommended, and will be removed in the next breaking release. Thus this method becomes obsolete and will be removed with the next breaking release.
pub fn set_window_update_mode(&mut self, mode: WindowUpdateMode) -> &mut Config
WindowUpdate::OnRead
is the default. WindowUpdate::OnReceive
breaks backpressure, is thus not recommended, and will be removed in the next breaking release. Thus this method becomes obsolete and will be removed with the next breaking release.Sets the window update mode that determines when the remote is given new credit for sending more data.
Trait Implementations§
§impl<C> InboundConnectionUpgrade<C> for Config
impl<C> InboundConnectionUpgrade<C> for Config
§type Output = Muxer<C>
type Output = Muxer<C>
Output after the upgrade has been successfully negotiated and the handshake performed.
§type Future = Ready<Result<<Config as InboundConnectionUpgrade<C>>::Output, <Config as InboundConnectionUpgrade<C>>::Error>>
type Future = Ready<Result<<Config as InboundConnectionUpgrade<C>>::Output, <Config as InboundConnectionUpgrade<C>>::Error>>
Future that performs the handshake with the remote.
§fn upgrade_inbound(
self,
io: C,
_: <Config as UpgradeInfo>::Info,
) -> <Config as InboundConnectionUpgrade<C>>::Future
fn upgrade_inbound( self, io: C, _: <Config as UpgradeInfo>::Info, ) -> <Config as InboundConnectionUpgrade<C>>::Future
After we have determined that the remote supports one of the protocols we support, this
method is called to start the handshake. Read more
§impl<C> OutboundConnectionUpgrade<C> for Config
impl<C> OutboundConnectionUpgrade<C> for Config
§type Output = Muxer<C>
type Output = Muxer<C>
Output after the upgrade has been successfully negotiated and the handshake performed.
§type Future = Ready<Result<<Config as OutboundConnectionUpgrade<C>>::Output, <Config as OutboundConnectionUpgrade<C>>::Error>>
type Future = Ready<Result<<Config as OutboundConnectionUpgrade<C>>::Output, <Config as OutboundConnectionUpgrade<C>>::Error>>
Future that performs the handshake with the remote.
§fn upgrade_outbound(
self,
io: C,
_: <Config as UpgradeInfo>::Info,
) -> <Config as OutboundConnectionUpgrade<C>>::Future
fn upgrade_outbound( self, io: C, _: <Config as UpgradeInfo>::Info, ) -> <Config as OutboundConnectionUpgrade<C>>::Future
After we have determined that the remote supports one of the protocols we support, this
method is called to start the handshake. Read more
§impl UpgradeInfo for Config
impl UpgradeInfo for Config
§fn protocol_info(&self) -> <Config as UpgradeInfo>::InfoIter
fn protocol_info(&self) -> <Config as UpgradeInfo>::InfoIter
Returns the list of protocols that are supported. Used during the negotiation process.
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> UpgradeInfoSend for Twhere
T: UpgradeInfo + Send + 'static,
<T as UpgradeInfo>::Info: Send + 'static,
<<T as UpgradeInfo>::InfoIter as IntoIterator>::IntoIter: Send + 'static,
impl<T> UpgradeInfoSend for Twhere
T: UpgradeInfo + Send + 'static,
<T as UpgradeInfo>::Info: Send + 'static,
<<T as UpgradeInfo>::InfoIter as IntoIterator>::IntoIter: Send + 'static,
§type Info = <T as UpgradeInfo>::Info
type Info = <T as UpgradeInfo>::Info
Equivalent to
UpgradeInfo::Info
.§type InfoIter = <<T as UpgradeInfo>::InfoIter as IntoIterator>::IntoIter
type InfoIter = <<T as UpgradeInfo>::InfoIter as IntoIterator>::IntoIter
Equivalent to
UpgradeInfo::InfoIter
.§fn protocol_info(&self) -> <T as UpgradeInfoSend>::InfoIter
fn protocol_info(&self) -> <T as UpgradeInfoSend>::InfoIter
Equivalent to
UpgradeInfo::protocol_info
.