GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Docs.rs
  • ringfire-0.5.2
  • Platform
  • x86_64-unknown-linux-gnu
  • Feature flags
  • About docs.rs
  • Badges
  • Builds
  • Metadata
  • Shorthand URLs
  • Download
  • Rustdoc JSON
  • Build queue
  • Privacy policy

This view

  • Original page
  • New address

GeezerVison is showing docs.rs — BlobProducer in ringfire::blob - Rust

ringfire::blob

Struct BlobProducer 

Source
pub struct BlobProducer<M: Copy + 'static> { /* private fields */ }
Expand description

Producer for variable-sized binary blobs and metadata in shared memory.

Implementations§

Source§

impl<M: Copy + 'static> BlobProducer<M>

Source

pub fn create<P: AsRef<Path>>( path: P, capacity: u64, arena_capacity: usize, ) -> Result<Self>

Creates a new blob producer with default options. capacity is the number of ring slots (power of 2). arena_capacity is the byte capacity of the payload arena (power of 2, e.g. 16MB).

Source

pub fn create_with_options<P: AsRef<Path>>( path: P, options: BlobProducerBuilder, ) -> Result<Self>

Creates a new blob producer with custom builder options.

Source

pub fn push(&mut self, meta: &M, payload: &[u8]) -> Result<u64>

Publishes a message with metadata and binary payload. Returns the assigned sequence number.

Source

pub fn push_with<F, R>( &mut self, meta: &M, len: usize, f: F, ) -> Result<(u64, R)>
where F: FnOnce(&mut [u8]) -> R,

Publishes with zero-copy writing directly into the payload arena.

Source

pub fn min_reader_seq(&self) -> Option<u64>

Minimum sequence across all currently living registered readers.

Source

pub fn reader_lag(&self) -> u64

Maximum lag across registered readers.

Source

pub fn headroom(&self) -> u64

Remaining write headroom before the slowest reader is lapped.

Source

pub fn active_readers(&self) -> Vec<ReaderInfo>

Status of all registered active readers.

Source

pub fn sequence(&self) -> u64

Current sequence number of the producer.

Source§

impl BlobProducer<()>

Convenience methods for producers with no metadata (M = ()).

Source

pub fn push_payload(&mut self, payload: &[u8]) -> Result<u64>

Trait Implementations§

Source§

impl<M: Copy + 'static> Debug for BlobProducer<M>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<M: Copy + 'static> Drop for BlobProducer<M>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl<M: Copy + Send + 'static> Send for BlobProducer<M>

Auto Trait Implementations§

§

impl<M> !Sync for BlobProducer<M>

§

impl<M> Forget for BlobProducer<M>

§

impl<M> Freeze for BlobProducer<M>
where *mut Slot<BlobPacket<M>>: Freeze, PhantomData<M>: Freeze,

§

impl<M> Move for BlobProducer<M>

§

impl<M> RefUnwindSafe for BlobProducer<M>
where *mut Slot<BlobPacket<M>>: RefUnwindSafe, PhantomData<M>: RefUnwindSafe,

§

impl<M> Unpin for BlobProducer<M>
where *mut Slot<BlobPacket<M>>: Unpin, PhantomData<M>: Unpin,

§

impl<M> UnsafeUnpin for BlobProducer<M>
where *mut Slot<BlobPacket<M>>: UnsafeUnpin, PhantomData<M>: UnsafeUnpin,

§

impl<M> UnwindSafe for BlobProducer<M>
where *mut Slot<BlobPacket<M>>: UnwindSafe, PhantomData<M>: UnwindSafe,

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> LayoutSignature for T
where T: 'static,

Source§

fn layout_signature() -> u64

Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.