#[non_exhaustive]pub struct SrtConfig {
pub handshake: HandshakeConfig,
pub io: IoConfig,
}Available on crate feature
tokio only.Expand description
Everything one SRT connection or listener is configured by: the handshake
this side advertises and the adapter’s timeouts and sizes. Every
SrtSocket and SrtListener constructor takes impl Into<SrtConfig>, so
a bare HandshakeConfig (default IoConfig) is accepted as is and a
full config is SrtConfig::new(handshake).with_io(io).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.handshake: HandshakeConfigThe handshake values this side advertises.
io: IoConfigThe tokio adapter’s timeouts and sizes.
Implementations§
Source§impl SrtConfig
impl SrtConfig
Sourcepub fn new(handshake: HandshakeConfig) -> Self
pub fn new(handshake: HandshakeConfig) -> Self
A config with handshake and the default IoConfig.
Sourcepub fn with_handshake(self, handshake: HandshakeConfig) -> Self
pub fn with_handshake(self, handshake: HandshakeConfig) -> Self
Replace SrtConfig::handshake.
Sourcepub fn with_io(self, io: IoConfig) -> Self
pub fn with_io(self, io: IoConfig) -> Self
Replace SrtConfig::io.
Trait Implementations§
Source§impl From<HandshakeConfig> for SrtConfig
impl From<HandshakeConfig> for SrtConfig
Source§fn from(handshake: HandshakeConfig) -> Self
fn from(handshake: HandshakeConfig) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for SrtConfig
Auto Trait Implementations§
impl Forget for SrtConfig
impl Freeze for SrtConfig
impl Move for SrtConfig
impl RefUnwindSafe for SrtConfig
impl Send for SrtConfig
impl Sync for SrtConfig
impl Unpin for SrtConfig
impl UnsafeUnpin for SrtConfig
impl UnwindSafe for SrtConfig
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