pub struct Receive { /* private fields */ }Expand description
A HackRF operating in receive mode.
Implementations§
Source§impl Receive
impl Receive
Sourcepub async fn new(
rf: HackRf,
transfer_size: usize,
) -> Result<Self, StateChangeError>
pub async fn new( rf: HackRf, transfer_size: usize, ) -> Result<Self, StateChangeError>
Switch a HackRF into receive mode.
Sourcepub fn submit(&mut self)
pub fn submit(&mut self)
Queue up a receive transfer.
This will pull from a reusable buffer pool first, and allocate a new buffer if none are available in the pool.
The buffer pool will grow so long as completed buffers aren’t dropped.
Sourcepub async fn next_complete(&mut self) -> Result<Buffer, Error>
pub async fn next_complete(&mut self) -> Result<Buffer, Error>
Retrieve the next chunk of receive data.
Auto Trait Implementations§
impl Freeze for Receive
impl !RefUnwindSafe for Receive
impl Send for Receive
impl !Sync for Receive
impl Unpin for Receive
impl !UnwindSafe for Receive
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