[][src]Struct leaves::segment::SegmentIDGen

pub struct SegmentIDGen<D> { /* fields omitted */ }

Implementations

impl<D: 'static + LeafDao + Send + Sync> SegmentIDGen<D>[src]

pub fn new(dao: Arc<D>, config: Config) -> Self[src]

pub async fn init<'_>(&'_ mut self) -> Result<()>[src]

pub async fn get<'_>(&'_ self, tag: i32) -> Result<i64>[src]

Get an ID

pub async fn update<'_>(&'_ self, tag: i32) -> Result<()>[src]

Update from database

pub async fn remove<'_>(&'_ self, tag: i32) -> bool[src]

Remove from cache, useful in lazy mode.

Auto Trait Implementations

impl<D> RefUnwindSafe for SegmentIDGen<D> where
    D: RefUnwindSafe

impl<D> Send for SegmentIDGen<D> where
    D: Send + Sync

impl<D> Sync for SegmentIDGen<D> where
    D: Send + Sync

impl<D> Unpin for SegmentIDGen<D>

impl<D> UnwindSafe for SegmentIDGen<D> where
    D: RefUnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,