Struct shardio::ShardSender [−][src]
A handle that is used to send data to a ShardWriter
. Each thread that is producing data
needs it’s own ShardSender. A ShardSender
can be obtained with the get_sender
method of
ShardWriter
. ShardSender implement clone.
Implementations
impl<T: Send, S> ShardSender<T, S> where
T: Send + Serialize,
S: SortKey<T>,
<S as SortKey<T>>::Key: Ord + Clone + Serialize,
[src]
T: Send + Serialize,
S: SortKey<T>,
<S as SortKey<T>>::Key: Ord + Clone + Serialize,
pub fn send(&mut self, item: T) -> Result<(), Error>
[src]
Send an item to the shard file
pub fn finished(&mut self) -> Result<(), Error>
[src]
Signal that you’ve finished sending items to this ShardSender
. finished
will called
if the ShardSender
is dropped. You must call finished()
or drop the ShardSender
prior to calling ShardWriter::finish
or dropping the ShardWriter, or you will get a panic.
Trait Implementations
impl<T, S> Clone for ShardSender<T, S> where
T: Send + Serialize,
S: SortKey<T>,
<S as SortKey<T>>::Key: Ord + Clone + Serialize,
[src]
T: Send + Serialize,
S: SortKey<T>,
<S as SortKey<T>>::Key: Ord + Clone + Serialize,
fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: Send, S: SortKey<T>> Drop for ShardSender<T, S> where
T: Send + Serialize,
S: SortKey<T>,
<S as SortKey<T>>::Key: Ord + Clone + Serialize,
[src]
T: Send + Serialize,
S: SortKey<T>,
<S as SortKey<T>>::Key: Ord + Clone + Serialize,
Auto Trait Implementations
impl<T, S> RefUnwindSafe for ShardSender<T, S> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, S> Send for ShardSender<T, S> where
<S as SortKey<T>>::Key: Send,
<S as SortKey<T>>::Key: Send,
impl<T, S> Sync for ShardSender<T, S> where
T: Sync,
<S as SortKey<T>>::Key: Send,
T: Sync,
<S as SortKey<T>>::Key: Send,
impl<T, S> Unpin for ShardSender<T, S> where
T: Unpin,
T: Unpin,
impl<T, S> UnwindSafe for ShardSender<T, S> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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>,