[−][src]Struct melib::collection::Collection
Fields
envelopes: Arc<RwLock<HashMap<EnvelopeHash, Envelope>>>
message_id_index: Arc<RwLock<HashMap<Vec<u8>, EnvelopeHash>>>
threads: Arc<RwLock<HashMap<MailboxHash, Threads>>>
sent_mailbox: Arc<RwLock<Option<MailboxHash>>>
mailboxes: Arc<RwLock<HashMap<MailboxHash, HashSet<EnvelopeHash>>>>
Implementations
impl Collection
[src]
pub fn new() -> Collection
[src]
pub fn len(&self) -> usize
[src]
pub fn is_empty(&self) -> bool
[src]
pub fn remove(&self, envelope_hash: EnvelopeHash, mailbox_hash: MailboxHash)
[src]
pub fn rename(
&self,
old_hash: EnvelopeHash,
new_hash: EnvelopeHash,
mailbox_hash: MailboxHash
) -> bool
[src]
&self,
old_hash: EnvelopeHash,
new_hash: EnvelopeHash,
mailbox_hash: MailboxHash
) -> bool
pub fn merge(
&self,
new_envelopes: HashMap<EnvelopeHash, Envelope>,
mailbox_hash: MailboxHash,
sent_mailbox: Option<MailboxHash>
) -> Option<SmallVec<[MailboxHash; 8]>>
[src]
&self,
new_envelopes: HashMap<EnvelopeHash, Envelope>,
mailbox_hash: MailboxHash,
sent_mailbox: Option<MailboxHash>
) -> Option<SmallVec<[MailboxHash; 8]>>
Merge new mailbox to collection and update threads. Returns a list of already existing mailboxs whose threads were updated
pub fn update(
&self,
old_hash: EnvelopeHash,
envelope: Envelope,
mailbox_hash: MailboxHash
)
[src]
&self,
old_hash: EnvelopeHash,
envelope: Envelope,
mailbox_hash: MailboxHash
)
pub fn update_flags(&self, env_hash: EnvelopeHash, mailbox_hash: MailboxHash)
[src]
pub fn insert(&self, envelope: Envelope, mailbox_hash: MailboxHash) -> bool
[src]
pub fn insert_reply(&self, env_hash: EnvelopeHash)
[src]
pub fn get_env(&self, env_hash: EnvelopeHash) -> EnvelopeRef<'_>
[src]
pub fn get_env_mut(&self, env_hash: EnvelopeHash) -> EnvelopeRefMut<'_>
[src]
pub fn get_threads(&self, hash: MailboxHash) -> RwRef<'_, MailboxHash, Threads>
[src]
pub fn get_mailbox(
&self,
hash: MailboxHash
) -> RwRef<'_, MailboxHash, HashSet<EnvelopeHash>>
[src]
&self,
hash: MailboxHash
) -> RwRef<'_, MailboxHash, HashSet<EnvelopeHash>>
pub fn contains_key(&self, env_hash: &EnvelopeHash) -> bool
[src]
pub fn new_mailbox(&self, mailbox_hash: MailboxHash)
[src]
Trait Implementations
impl Clone for Collection
[src]
fn clone(&self) -> Collection
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for Collection
[src]
impl Default for Collection
[src]
Auto Trait Implementations
impl RefUnwindSafe for Collection
impl !Send for Collection
impl !Sync for Collection
impl Unpin for Collection
impl UnwindSafe for Collection
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[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.
fn to_owned(&self) -> T
[src]
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.
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.
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>,
fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,