Struct libp2p_yamux::Config
source · pub struct Config(/* private fields */);
Expand description
The yamux configuration.
Implementations§
source§impl Config
impl Config
sourcepub fn client() -> Self
👎Deprecated: Will be removed with the next breaking release.
pub fn client() -> Self
Creates a new YamuxConfig
in client mode, regardless of whether
it will be used for an inbound or outbound upgrade.
sourcepub fn server() -> Self
👎Deprecated: Will be removed with the next breaking release.
pub fn server() -> Self
Creates a new YamuxConfig
in server mode, regardless of whether
it will be used for an inbound or outbound upgrade.
sourcepub fn set_receive_window_size(&mut self, num_bytes: u32) -> &mut Self
👎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 Self
Sets the size (in bytes) of the receive window per substream.
sourcepub fn set_max_buffer_size(&mut self, num_bytes: usize) -> &mut Self
👎Deprecated: Will be removed with the next breaking release.
pub fn set_max_buffer_size(&mut self, num_bytes: usize) -> &mut Self
Sets the maximum size (in bytes) of the receive buffer per substream.
sourcepub fn set_max_num_streams(&mut self, num_streams: usize) -> &mut Self
pub fn set_max_num_streams(&mut self, num_streams: usize) -> &mut Self
Sets the maximum number of concurrent substreams.
sourcepub fn set_window_update_mode(&mut self, mode: WindowUpdateMode) -> &mut Self
👎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 Self
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§
source§impl<C> InboundConnectionUpgrade<C> for Config
impl<C> InboundConnectionUpgrade<C> for Config
source§impl<C> OutboundConnectionUpgrade<C> for Config
impl<C> OutboundConnectionUpgrade<C> for Config
source§impl UpgradeInfo for Config
impl UpgradeInfo for Config
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§
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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