[−][src]Struct yaque::Sender
The sender part of the queue. This part is lock-free and therefore can be used outside an asynchronous context.
Implementations
impl Sender
[src]
pub fn open<P: AsRef<Path>>(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.
pub fn send<D: AsRef<[u8]>>(&mut self, data: D) -> Result<()>
[src]
Sends some data into the queue. One send is always atomic.
Errors
This function returns any underlying errors encoutered while writing or flushing the queue.
pub fn send_batch<I>(&mut self, it: I) -> Result<()> where
I: IntoIterator,
I::Item: AsRef<[u8]>,
[src]
I: IntoIterator,
I::Item: AsRef<[u8]>,
Sends all the contents of an iterable into the queue. All is buffered to be sent atomically, in one flush operation.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Sender
impl Send for Sender
impl Sync for Sender
impl Unpin for Sender
impl UnwindSafe for Sender
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,
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, 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.
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>,