RingBufferProducer

Struct RingBufferProducer 

Source
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

Source

pub fn make_and_register(path: &str, name: &str) -> Result<(), String>

Create and register a ringbuffer:

Source

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.

Source

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§

Source§

impl Drop for RingBufferProducer

When we drop we should disconnect just to be sure. though theoretically, closing the client wouuld take care of that… there’s always the possibility of cloned clients.

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> ErasedDestructor for T
where T: 'static,