pub struct RemuxConfig { /* private fields */ }
Expand description
The remux configuration.
Implementations§
Source§impl RemuxConfig
impl RemuxConfig
Sourcepub fn client() -> Self
pub fn client() -> Self
Creates a new RemuxConfig
in client mode, regardless of whether
it will be used for an inbound or outbound upgrade.
Sourcepub fn server() -> Self
pub fn server() -> Self
Creates a new RemuxConfig
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
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
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
pub fn set_window_update_mode(&mut self, mode: WindowUpdateMode) -> &mut Self
Sets the window update mode that determines when the remote is given new credit for sending more data.
Sourcepub fn into_local(self) -> RemuxLocalConfig
pub fn into_local(self) -> RemuxLocalConfig
Converts the config into a RemuxLocalConfig
for use with upgrades
of I/O streams that are ![Send
].
Trait Implementations§
Source§impl Clone for RemuxConfig
impl Clone for RemuxConfig
Source§fn clone(&self) -> RemuxConfig
fn clone(&self) -> RemuxConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Default for RemuxConfig
impl Default for RemuxConfig
Source§impl<C> InboundUpgrade<C> for RemuxConfig
impl<C> InboundUpgrade<C> for RemuxConfig
Source§type Output = Remux<Incoming<C>>
type Output = Remux<Incoming<C>>
Output after the upgrade has been successfully negotiated and the handshake performed.
Source§type Future = Ready<Result<<RemuxConfig as InboundUpgrade<C>>::Output, <RemuxConfig as InboundUpgrade<C>>::Error>>
type Future = Ready<Result<<RemuxConfig as InboundUpgrade<C>>::Output, <RemuxConfig as InboundUpgrade<C>>::Error>>
Future that performs the handshake with the remote.
Source§impl<C> OutboundUpgrade<C> for RemuxConfig
impl<C> OutboundUpgrade<C> for RemuxConfig
Source§type Output = Remux<Incoming<C>>
type Output = Remux<Incoming<C>>
Output after the upgrade has been successfully negotiated and the handshake performed.
Source§type Future = Ready<Result<<RemuxConfig as OutboundUpgrade<C>>::Output, <RemuxConfig as OutboundUpgrade<C>>::Error>>
type Future = Ready<Result<<RemuxConfig as OutboundUpgrade<C>>::Output, <RemuxConfig as OutboundUpgrade<C>>::Error>>
Future that performs the handshake with the remote.
Source§impl UpgradeInfo for RemuxConfig
impl UpgradeInfo for RemuxConfig
Source§type InfoIter = Once<<RemuxConfig as UpgradeInfo>::Info>
type InfoIter = Once<<RemuxConfig as UpgradeInfo>::Info>
Iterator returned by
protocol_info
.Source§fn protocol_info(&self) -> Self::InfoIter
fn protocol_info(&self) -> Self::InfoIter
Returns the list of protocols that are supported. Used during the negotiation process.
Auto Trait Implementations§
impl Freeze for RemuxConfig
impl RefUnwindSafe for RemuxConfig
impl Send for RemuxConfig
impl Sync for RemuxConfig
impl Unpin for RemuxConfig
impl UnwindSafe for RemuxConfig
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§impl<C, U> InboundUpgradeExt<C> for Uwhere
U: InboundUpgrade<C>,
impl<C, U> InboundUpgradeExt<C> for Uwhere
U: InboundUpgrade<C>,
Source§fn map_inbound<F, T>(self, f: F) -> MapInboundUpgrade<Self, F>
fn map_inbound<F, T>(self, f: F) -> MapInboundUpgrade<Self, F>
Returns a new object that wraps around
Self
and applies a closure to the Output
.Source§fn map_inbound_err<F, T>(self, f: F) -> MapInboundUpgradeErr<Self, F>
fn map_inbound_err<F, T>(self, f: F) -> MapInboundUpgradeErr<Self, F>
Returns a new object that wraps around
Self
and applies a closure to the Error
.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 moreSource§impl<C, U> OutboundUpgradeExt<C> for Uwhere
U: OutboundUpgrade<C>,
impl<C, U> OutboundUpgradeExt<C> for Uwhere
U: OutboundUpgrade<C>,
Source§fn map_outbound<F, T>(self, f: F) -> MapOutboundUpgrade<Self, F>
fn map_outbound<F, T>(self, f: F) -> MapOutboundUpgrade<Self, F>
Returns a new object that wraps around
Self
and applies a closure to the Output
.Source§fn map_outbound_err<F, T>(self, f: F) -> MapOutboundUpgradeErr<Self, F>
fn map_outbound_err<F, T>(self, f: F) -> MapOutboundUpgradeErr<Self, F>
Returns a new object that wraps around
Self
and applies a closure to the Error
.