pub struct Producer { /* private fields */ }Expand description
Thread-safe Producer type.
use disk_chan::new to create a new Producer for a channel. This will lock the channel to the process as only one process should own the channel at any time.
Use clone to make copies of the Producer. Note that try_clone also exists but is solely for consistency with the Consumer api and cannot actually fail.
let mut tx = disk_chan::new("foo", 2_u32.pow(24), 1).await?;
tx.send("test").await?;Implementations§
Source§impl Producer
impl Producer
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Producer
impl !RefUnwindSafe for Producer
impl Send for Producer
impl Sync for Producer
impl Unpin for Producer
impl !UnwindSafe for Producer
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