pub struct RtpEcho { /* private fields */ }Expand description
A bound, not-yet-running RTP echo fixture.
Implementations§
Source§impl RtpEcho
impl RtpEcho
Sourcepub async fn bind(config: EchoConfig) -> Result<Self, EchoError>
pub async fn bind(config: EchoConfig) -> Result<Self, EchoError>
Bind the fixture’s sole UDP socket.
Sourcepub const fn local_addr(&self) -> SocketAddr
pub const fn local_addr(&self) -> SocketAddr
The actual bound address, including the OS-selected port when configuration used port zero.
Sourcepub async fn run(self) -> Result<EchoReport, EchoError>
pub async fn run(self) -> Result<EchoReport, EchoError>
Echo exactly the configured number of valid PCMU packets within the whole-run deadline.
This consumes the fixture and spawns no task. Cancelling the future therefore drops the sole socket immediately; completion and error take the same ownership path.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for RtpEcho
impl RefUnwindSafe for RtpEcho
impl Send for RtpEcho
impl Sync for RtpEcho
impl Unpin for RtpEcho
impl UnsafeUnpin for RtpEcho
impl UnwindSafe for RtpEcho
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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