Struct sqlite_collections::ds::set::Set

source ·
pub struct Set<'db, 'tbl, S, C>{ /* private fields */ }
Expand description

Deterministic store set.

Implementations§

source§

impl<S, C> Set<'static, 'static, S, C>

source

pub fn open(connection: C) -> Result<Self, OpenError>

source

pub fn unchecked_open(connection: C) -> Self

Open a set without creating it or checking if it exists. This is safe if you call a safe open in (or under) the same transaction or savepoint beforehand.

source§

impl<'db, 'tbl, S, C> Set<'db, 'tbl, S, C>

source

pub fn open_with_config( connection: C, config: Config<'db, 'tbl> ) -> Result<Self, OpenError>

source

pub fn unchecked_open_with_config( connection: C, config: Config<'db, 'tbl> ) -> Self

Open a set without creating it or checking if it exists. This is safe if you call a safe open in (or under) the same transaction or savepoint beforehand.

source

pub fn insert(&mut self, value: &S::TargetBorrowed) -> Result<bool, Error<S>>

source

pub fn contains(&mut self, value: &S::TargetBorrowed) -> Result<bool, Error<S>>

source

pub fn remove<Q>(&mut self, value: &S::TargetBorrowed) -> Result<bool, Error<S>>

source

pub fn clear(&mut self) -> Result<(), Error<S>>

source

pub fn first(&mut self) -> Result<Option<S::Target>, Error<S>>

source

pub fn last(&mut self) -> Result<Option<S::Target>, Error<S>>

source

pub fn len(&mut self) -> Result<u64, Error<S>>

source

pub fn iter(&mut self) -> Result<Iter<'db, 'tbl, S, Savepoint<'_>>, Error<S>>

Auto Trait Implementations§

§

impl<'db, 'tbl, S, C> RefUnwindSafe for Set<'db, 'tbl, S, C>

§

impl<'db, 'tbl, S, C> Send for Set<'db, 'tbl, S, C>
where C: Send, S: Send,

§

impl<'db, 'tbl, S, C> Sync for Set<'db, 'tbl, S, C>
where C: Sync, S: Sync,

§

impl<'db, 'tbl, S, C> Unpin for Set<'db, 'tbl, S, C>
where C: Unpin, S: Unpin,

§

impl<'db, 'tbl, S, C> UnwindSafe for Set<'db, 'tbl, S, C>
where C: UnwindSafe, S: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.