pub struct Optional<E>(pub E);

Tuple Fields§

§0: E

Implementations§

source§

impl<E: Endpoint> Optional<E>

source

pub fn ignore(self) -> Ignore<Self>

Trait Implementations§

source§

impl<E: Debug> Debug for Optional<E>

source§

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

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

impl<E> Deref for Optional<E>

§

type Target = E

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<E, C> Query<C, ()> for Optional<Ignore<E>>where E: Debug + Endpoint + Send + Sync, C: Client + Debug + Sync,

source§

fn query<'life0, 'life1, 'async_trait>( &'life0 self, client: &'life1 C ) -> Pin<Box<dyn Future<Output = Result<(), C::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

impl<E, C, T> Query<C, Option<T>> for Optional<E>where E: Debug + Endpoint + Send + Sync, C: Client + Debug + Sync, T: Debug + DeserializeOwned, E::Response<T>: DeserializeOwned + UnwrapResponse<T>,

source§

fn query<'life0, 'life1, 'async_trait>( &'life0 self, client: &'life1 C ) -> Pin<Box<dyn Future<Output = Result<Option<T>, C::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Auto Trait Implementations§

§

impl<E> RefUnwindSafe for Optional<E>where E: RefUnwindSafe,

§

impl<E> Send for Optional<E>where E: Send,

§

impl<E> Sync for Optional<E>where E: Sync,

§

impl<E> Unpin for Optional<E>where E: Unpin,

§

impl<E> UnwindSafe for Optional<E>where E: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FutureExt for T

§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

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

const: unstable · 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> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T> IntoSql for T

source§

fn into_sql<T>(self) -> Self::Expressionwhere Self: AsExpression<T> + Sized, T: SqlType + TypedExpressionType,

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>>::Expressionwhere &'a Self: AsExpression<T>, T: SqlType + TypedExpressionType,

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

impl<'query, C, T> MaybeAudit<'query, C> for Twhere T: Sync,

§

default fn maybe_insert_audit_records<'life0, 'life1, 'async_trait>( _: &'life0 mut C, _: &'life1 [T] ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait,

source§

impl<T> RawSession<T> for Twhere T: Send + Sync + 'static,

§

type Key = ()

§

type Validation = ()

source§

fn try_decode( self, _: &<T as RawSession<T>>::Key, _: &<T as RawSession<T>>::Validation ) -> Result<T, Error>

source§

fn add_extensions( session: Result<Option<T>, Error>, _: &<T as RawSession<T>>::Key, _: &<T as RawSession<T>>::Validation, extensions: &mut Extensions )

§

impl<T, Conn> RunQueryDsl<Conn> for T

§

fn execute<'query, 'conn>( self, conn: &'conn mut Conn ) -> <Conn as AsyncConnection>::ExecuteFuture<'conn, 'query>where Conn: AsyncConnection + Send, Self: ExecuteDsl<Conn, <Conn as AsyncConnection>::Backend> + 'query,

Executes the given command, returning the number of rows affected. Read more
§

fn load<'query, U, 'conn>( self, conn: &'conn mut Conn ) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U, Global>>, fn(_: Self::Stream<'conn>) -> TryCollect<Self::Stream<'conn>, Vec<U, Global>>>where U: Send, Conn: AsyncConnection, Self: LoadQuery<'query, Conn, U> + 'query,

Executes the given query, returning a Vec with the returned rows. Read more
§

fn load_stream<'conn, 'query, U>( self, conn: &'conn mut Conn ) -> Self::LoadFuture<'conn>where Conn: AsyncConnection, U: 'conn, Self: LoadQuery<'query, Conn, U> + 'query,

Executes the given query, returning a [Stream] with the returned rows. Read more
§

fn get_result<'query, 'conn, U>( self, conn: &'conn mut Conn ) -> AndThen<Self::LoadFuture<'conn>, Map<StreamFuture<Pin<Box<Self::Stream<'conn>, Global>>>, fn(_: (Option<Result<U, Error>>, Pin<Box<Self::Stream<'conn>, Global>>)) -> Result<U, Error>>, fn(_: Self::Stream<'conn>) -> Map<StreamFuture<Pin<Box<Self::Stream<'conn>, Global>>>, fn(_: (Option<Result<U, Error>>, Pin<Box<Self::Stream<'conn>, Global>>)) -> Result<U, Error>>>where U: Send + 'conn, Conn: AsyncConnection, Self: LoadQuery<'query, Conn, U> + 'query,

Runs the command, and returns the affected row. Read more
§

fn get_results<'query, U, 'conn>( self, conn: &'conn mut Conn ) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U, Global>>, fn(_: Self::Stream<'conn>) -> TryCollect<Self::Stream<'conn>, Vec<U, Global>>>where U: Send, Conn: AsyncConnection, Self: LoadQuery<'query, Conn, U> + 'query,

Runs the command, returning an Vec with the affected rows. Read more
§

fn first<'query, 'conn, U>( self, conn: &'conn mut Conn ) -> AndThen<<Self::Output as LoadQuery<'query, Conn, U>>::LoadFuture<'conn>, Map<StreamFuture<Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>, Global>>>, fn(_: (Option<Result<U, Error>>, Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>, Global>>)) -> Result<U, Error>>, fn(_: <Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>) -> Map<StreamFuture<Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>, Global>>>, fn(_: (Option<Result<U, Error>>, Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>, Global>>)) -> Result<U, Error>>>where U: Send + 'conn, Conn: AsyncConnection, Self: LimitDsl, Self::Output: LoadQuery<'query, Conn, U> + Send + 'query,

Attempts to load a single record. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<S, Wrapper> SessionStore for Wrapperwhere S: SessionStore + ?Sized, Wrapper: 'static + Debug + Deref<Target = S> + Send + Sync,

§

type Value = <S as SessionStore>::Value

source§

fn key(&self) -> &Key

source§

fn key_name(&self) -> &str

source§

fn set<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, prefix: Option<String>, session_id: &'life1 Uuid, session: &'life2 Session<<Wrapper as SessionStore>::Value> ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Wrapper: 'async_trait,

source§

fn get<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 Uuid ) -> Pin<Box<dyn Future<Output = Result<Session<<Wrapper as SessionStore>::Value>, Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, Wrapper: 'async_trait,

source§

fn delete<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 Uuid ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, Wrapper: 'async_trait,

source§

fn delete_session<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, res: &'life1 mut Response<Body>, cookie_config: CookieConfig<'life2, ()>, session_id: Option<&'life3 Uuid> ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, Wrapper: 'async_trait,

source§

fn into_dyn(self) -> Arc<dyn SessionStore<Value = Self::Value> + 'static>where Self: Sized,

source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
§

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

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> AccountSessionStore for Twhere T: SessionStore<Value = AccountSessionToken<()>>,

§

impl<T> Formattable for Twhere T: Deref, <T as Deref>::Target: Formattable,

§

impl<T> Parsable for Twhere T: Deref, <T as Deref>::Target: Parsable,