#[non_exhaustive]pub struct RtmpTimeouts {
pub connect: Duration,
pub handshake: Duration,
pub read_idle: Duration,
pub write: Duration,
}Available on crate feature
tokio only.Expand description
Explicit bounds on every awaited IO of the RTMP adapters (W1 SP1.3): no wait is unbounded.
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.connect: DurationDNS + TCP connect (client). Default 10 s.
handshake: DurationFrom connection start until the connect command is accepted
(ServerEvent::Connected). Default 10 s.
read_idle: DurationLongest wait for the next non-empty batch of events. One deadline covers the whole wait: chunks that yield no events (a partial chunk, a handshake step) do not restart it, so a peer dripping bytes still times out. Default 30 s.
write: DurationLongest wait for the socket to accept pending writes. Default 10 s.
Implementations§
Source§impl RtmpTimeouts
impl RtmpTimeouts
Sourcepub fn with_connect(self, d: Duration) -> Self
pub fn with_connect(self, d: Duration) -> Self
Sets connect.
Sourcepub fn with_handshake(self, d: Duration) -> Self
pub fn with_handshake(self, d: Duration) -> Self
Sets handshake.
Sourcepub fn with_read_idle(self, d: Duration) -> Self
pub fn with_read_idle(self, d: Duration) -> Self
Sets read_idle.
Sourcepub fn with_write(self, d: Duration) -> Self
pub fn with_write(self, d: Duration) -> Self
Sets write.
Trait Implementations§
Source§impl Clone for RtmpTimeouts
impl Clone for RtmpTimeouts
impl Copy for RtmpTimeouts
Source§impl Debug for RtmpTimeouts
impl Debug for RtmpTimeouts
Source§impl Default for RtmpTimeouts
impl Default for RtmpTimeouts
impl Eq for RtmpTimeouts
Source§impl PartialEq for RtmpTimeouts
impl PartialEq for RtmpTimeouts
impl StructuralPartialEq for RtmpTimeouts
Auto Trait Implementations§
impl Forget for RtmpTimeouts
impl Freeze for RtmpTimeouts
impl RefUnwindSafe for RtmpTimeouts
impl Send for RtmpTimeouts
impl Sync for RtmpTimeouts
impl Unpin for RtmpTimeouts
impl UnsafeUnpin for RtmpTimeouts
impl UnwindSafe for RtmpTimeouts
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