Skip to main content

Get

Struct Get 

Source
pub struct Get<Conn, Table, C>
where Conn: Connection + Unpin + 'static, Conn::Backend: HasSqlType<Table::SqlType>, Table: Table + HasTable<Table = Table> + AsQuery, Table::Query: QueryId + QueryFragment<Conn::Backend>, C: Cache<Conn, Table>,
{ pub id: C::Id, }
Expand description

Gets item by id

Fields§

§id: C::Id

Id of item to get

Trait Implementations§

Source§

impl<Conn, Table, C> Clone for Get<Conn, Table, C>
where Conn: Connection + Unpin + 'static, Conn::Backend: HasSqlType<Table::SqlType>, Table: Table + HasTable<Table = Table> + AsQuery, Table::Query: QueryId + QueryFragment<Conn::Backend>, C: Cache<Conn, Table>, C::Id: Clone,

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Conn, Table, C> Copy for Get<Conn, Table, C>
where Conn: Connection + Unpin + 'static, Conn::Backend: HasSqlType<Table::SqlType>, Table: Table + HasTable<Table = Table> + AsQuery, Table::Query: QueryId + QueryFragment<Conn::Backend>, C: Cache<Conn, Table>, C::Id: Clone + Copy,

Source§

impl<Conn, Table, C> Debug for Get<Conn, Table, C>
where Conn: Connection + Unpin + 'static + Debug, Conn::Backend: HasSqlType<Table::SqlType>, Table: Table + HasTable<Table = Table> + AsQuery + Debug, Table::Query: QueryId + QueryFragment<Conn::Backend>, C: Cache<Conn, Table> + Debug, C::Id: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<Conn, Table, C> Handler<Get<Conn, Table, C>> for CacheDbActor<Conn, Table, C>
where Conn: Connection + Unpin + 'static, Conn::Backend: HasSqlType<Table::SqlType>, Table: Table + HasTable<Table = Table> + AsQuery + Unpin + 'static, Table::Query: QueryId + QueryFragment<Conn::Backend>, C: Cache<Conn, Table>,

Source§

type Result = Result<Option<C>, Error>

The type of value that this handler will return. Read more
Source§

fn handle( &mut self, _: Get<Conn, Table, C>, _: &mut Context<Self>, ) -> Self::Result

This method is called for every message received by this actor.
Source§

impl<Conn, Table, C> Message for Get<Conn, Table, C>
where Conn: Connection + Unpin + 'static, Conn::Backend: HasSqlType<Table::SqlType>, Table: Table + HasTable<Table = Table> + AsQuery, Table::Query: QueryId + QueryFragment<Conn::Backend>, C: Cache<Conn, Table>,

Source§

type Result = Result<Option<C>, Error>

The type of value that this message will resolved with if it is successful.

Auto Trait Implementations§

§

impl<Conn, Table, C> Freeze for Get<Conn, Table, C>
where <C as Cache<Conn, Table>>::Id: Freeze,

§

impl<Conn, Table, C> RefUnwindSafe for Get<Conn, Table, C>
where <C as Cache<Conn, Table>>::Id: RefUnwindSafe,

§

impl<Conn, Table, C> Send for Get<Conn, Table, C>
where <C as Cache<Conn, Table>>::Id: Send,

§

impl<Conn, Table, C> Sync for Get<Conn, Table, C>
where <C as Cache<Conn, Table>>::Id: Sync,

§

impl<Conn, Table, C> Unpin for Get<Conn, Table, C>
where <C as Cache<Conn, Table>>::Id: Unpin,

§

impl<Conn, Table, C> UnsafeUnpin for Get<Conn, Table, C>
where <C as Cache<Conn, Table>>::Id: UnsafeUnpin,

§

impl<Conn, Table, C> UnwindSafe for Get<Conn, Table, C>
where <C as Cache<Conn, Table>>::Id: 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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> IntoSql for T

Source§

fn into_sql<T>(self) -> Self::Expression
where Self: Sized + AsExpression<T>,

Convert self to an expression for Diesel’s query builder. Read more
Source§

fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
where &'a Self: AsExpression<T>,

Convert &self to an expression for Diesel’s query builder. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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>,

Source§

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.
Source§

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

Source§

fn vzip(self) -> V