Enum txn_types::timestamp::TsSet [−][src]
A hybrid immutable set for timestamps.
Variants
When the set is empty, avoid the useless cloning of Arc.
Vec
is suitable when the set is small or the set is barely used, and it doesn’t worth
converting a Vec
into a HashSet
.
Set
is suitable when there are many timestamps and it will be queried multiple times.
Implementations
impl TsSet
[src]
pub fn new(ts: Vec<TimeStamp>) -> Self
[src]
Create a TsSet
from the given vec of timestamps. It will select the proper internal
collection type according to the size.
pub fn from_u64s(ts: Vec<u64>) -> Self
[src]
pub fn vec_from_u64s(ts: Vec<u64>) -> Self
[src]
pub fn vec(ts: Vec<TimeStamp>) -> Self
[src]
Create a TsSet
from the given vec of timestamps, but it will be forced to use Vec
as the
internal collection type. When it’s sure that the set will be queried at most once, use this
is better than TsSet::new
, since both the querying on Vec
and the conversion from Vec
to HashSet
is O(N).
pub fn contains(&self, ts: TimeStamp) -> bool
[src]
Query whether the given timestamp is contained in the set.
Trait Implementations
impl Clone for TsSet
[src]
impl Debug for TsSet
[src]
impl Default for TsSet
[src]
impl PartialEq<TsSet> for TsSet
[src]
impl StructuralPartialEq for TsSet
[src]
Auto Trait Implementations
impl RefUnwindSafe for TsSet
impl Send for TsSet
impl Sync for TsSet
impl Unpin for TsSet
impl UnwindSafe for TsSet
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> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub 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> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> Sealed<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,
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>,
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>,
[src]
V: MultiLane<T>,