pub struct RingBufferProducer {
pub ring: Producer,
/* private fields */
}
Expand description
A ring buffer producer, needs a continuous connection to the ring master or it will be forced off the ring. This struct packages that with the producer. Creating one of these will make the producer connection if it can and register it with the ring master.
Fields§
§ring: Producer
Implementations§
Source§impl RingBufferProducer
impl RingBufferProducer
Sourcepub fn make_and_register(path: &str, name: &str) -> Result<(), String>
pub fn make_and_register(path: &str, name: &str) -> Result<(), String>
Create and register a ringbuffer:
Sourcepub fn attach(name: &str) -> Result<RingBufferProducer, String>
pub fn attach(name: &str) -> Result<RingBufferProducer, String>
Attach to a pre-existing ring as a producer. This will fail if there is no such ringbuffer.
Sourcepub fn create_and_attach(name: &str) -> Result<RingBufferProducer, String>
pub fn create_and_attach(name: &str) -> Result<RingBufferProducer, String>
Attach as a producer creating the ring if it does not already exists.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RingBufferProducer
impl RefUnwindSafe for RingBufferProducer
impl Send for RingBufferProducer
impl Sync for RingBufferProducer
impl Unpin for RingBufferProducer
impl UnwindSafe for RingBufferProducer
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