pub struct RxStream { /* private fields */ }Expand description
Owned HackRF receive stream.
Waiting the first RxStream::start chooses native blocking USB; awaiting
it chooses asynchronous USB. Do not mix the two execution styles on one
stream. The steady-state read path owns its endpoint and never takes the
device lifecycle mutex.
Implementations§
Source§impl RxStream
impl RxStream
Sourcepub fn start(&mut self) -> impl MaybeFuture<Output = Result<()>> + '_
pub fn start(&mut self) -> impl MaybeFuture<Output = Result<()>> + '_
Start reception and the persistent USB transfer queue.
Sourcepub fn read<'a>(
&'a mut self,
out: &'a mut [Complex32],
timeout: Option<Duration>,
) -> impl MaybeFuture<Output = Result<usize>> + 'a
pub fn read<'a>( &'a mut self, out: &'a mut [Complex32], timeout: Option<Duration>, ) -> impl MaybeFuture<Output = Result<usize>> + 'a
Read normalized complex IQ samples.
Blocking operation fills the output until its total timeout expires;
None waits indefinitely. Awaited operation ignores the timeout and
consumes buffered data or one new USB completion.
Sourcepub fn stop(&mut self) -> impl MaybeFuture<Output = Result<StreamingStats>> + '_
pub fn stop(&mut self) -> impl MaybeFuture<Output = Result<StreamingStats>> + '_
Stop reception and return accumulated stream counters.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for RxStream
impl !UnwindSafe for RxStream
impl Freeze for RxStream
impl Send for RxStream
impl Sync for RxStream
impl Unpin for RxStream
impl UnsafeUnpin for RxStream
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