Struct yaque::SenderBuilder [−][src]
A builder for the sender side of the queue. Use this if you want to have fine-grained control over the configuration of the queue. Most defaults sould be ok of most applications.
Implementations
impl SenderBuilder
[src]
pub fn new() -> SenderBuilder
[src]
Creates a new sender builder. Finish build it by invoking SenderBuilder::open
.
pub fn segment_size(self, size: u64) -> SenderBuilder
[src]
The segment size in bytes that will trigger a new segment to be created. Segments an be bigger than this to accomodate the last element, but nothing beyond that (each segment must store at least one element).
Default value: 4 * 1024 * 1024
, or 4MB.
Panics
This function panics if size
is zero.
pub fn max_queue_size(self, size: Option<u64>) -> SenderBuilder
[src]
The queue size that will block the sender from creating a new segment (until the receiver
catches up, deleting old segments). The queue can get bigger than that, but only to
accomodate the last segment (the queue must have at least one segment). Set this to None
to create an unbounded queue.
This value will be ignored if the queue has only one segment, since the queue would
deadlock otherwise. It is recomended that you set max_queue_size >> segment_size
.
Default value: None
Panics
This function panics if size
is zero.
pub fn open<P: AsRef<Path>>(self, base: P) -> Result<Sender>
[src]
Opens a queue on a folder indicated by the base
path for sending. The
folder will be created if it does not already exist.
Errors
This function will return an IO error if the queue is already in use for sending, which is indicated by a lock file. Also, any other IO error encountered while opening will be sent.
Trait Implementations
impl Default for SenderBuilder
[src]
fn default() -> SenderBuilder
[src]
Auto Trait Implementations
impl RefUnwindSafe for SenderBuilder
impl Send for SenderBuilder
impl Sync for SenderBuilder
impl Unpin for SenderBuilder
impl UnwindSafe for SenderBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,