pub struct ChannelConfig { /* private fields */ }Expand description
Channel configuration.
Implementations§
Source§impl ChannelConfig
impl ChannelConfig
Sourcepub fn new(password: &str, service: &str) -> Self
pub fn new(password: &str, service: &str) -> Self
Create new channel configuration.
§Arguments
password- Shared secret between partiesservice- Service identifier for domain separation
Sourcepub fn with_iterations(self, iterations: u32) -> Self
pub fn with_iterations(self, iterations: u32) -> Self
Set custom PBKDF2 iterations.
Sourcepub fn with_timeout(self, timeout_ms: u64) -> Self
pub fn with_timeout(self, timeout_ms: u64) -> Self
Set handshake timeout.
Sourcepub fn with_max_message_size(self, size: usize) -> Self
pub fn with_max_message_size(self, size: usize) -> Self
Set maximum message size in bytes (capped at 16 MB).
Sourcepub fn max_message_size(&self) -> usize
pub fn max_message_size(&self) -> usize
Get maximum message size in bytes.
Trait Implementations§
Source§impl Clone for ChannelConfig
impl Clone for ChannelConfig
Source§fn clone(&self) -> ChannelConfig
fn clone(&self) -> ChannelConfig
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 moreAuto Trait Implementations§
impl Freeze for ChannelConfig
impl RefUnwindSafe for ChannelConfig
impl Send for ChannelConfig
impl Sync for ChannelConfig
impl Unpin for ChannelConfig
impl UnsafeUnpin for ChannelConfig
impl UnwindSafe for ChannelConfig
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