[][src]Struct pipitor::App

pub struct App<S, B, I = Listener> where
    S: HttpService<B>, 
{ /* fields omitted */ }

Implementations

impl<I> App<Client<HttpsConnector<HttpConnector>>, Body, I> where
    I: TryStream + Bind<Addr>,
    I::Ok: AsyncRead + AsyncWrite + Send + Unpin + 'static,
    <I as TryStream>::Error: Error + Send + Sync + 'static,
    <I as Bind<Addr>>::Error: Error + Send + Sync + 'static,
    TcpListener: TryInto<I>,
    <TcpListener as TryInto<I>>::Error: Error + Send + Sync + 'static, 
[src]

pub fn new(manifest: Manifest) -> impl Future<Output = Result<Self>> where
    UnixListener: TryInto<I>,
    <UnixListener as TryInto<I>>::Error: Error + Send + Sync + 'static, 
[src]

impl<S, B, I> App<S, B, I> where
    S: HttpService<B> + Clone + Send + Sync + 'static,
    S::Future: Send,
    S::ResponseBody: Send,
    <S::ResponseBody as Body>::Error: Error + Send + Sync + 'static,
    B: Default + From<Vec<u8>> + Send + 'static,
    I: TryStream + Bind<Addr>,
    I::Ok: AsyncRead + AsyncWrite + Send + Unpin + 'static,
    <I as TryStream>::Error: Error + Send + Sync + 'static,
    <I as Bind<Addr>>::Error: Error + Send + Sync + 'static,
    TcpListener: TryInto<I>,
    <TcpListener as TryInto<I>>::Error: Error + Send + Sync + 'static, 
[src]

pub async fn with_http_client(client: S, manifest: Manifest) -> Result<Self> where
    UnixListener: TryInto<I>,
    <UnixListener as TryInto<I>>::Error: Error + Send + Sync + 'static, 
[src]

impl<S, B, I> App<S, B, I> where
    S: HttpService<B> + Clone + Send + Sync + 'static,
    S::Future: Send,
    S::ResponseBody: Send,
    <S::ResponseBody as Body>::Error: Error + Send + Sync + 'static,
    B: Default + From<Vec<u8>> + Send + 'static, 
[src]

pub fn shutdown<'a>(
    self: Pin<&'a mut Self>
) -> impl Future<Output = Result<()>> + 'a
[src]

pub async fn reset<'_>(__arg0: Pin<&'_ mut Self>) -> Result<()>[src]

pub async fn replace_manifest<'_>(
    &'_ mut self,
    manifest: Manifest
) -> Result<Manifest, (Error, Manifest)>
[src]

Replaces the App's manifest.

Unlike manifest_mut, this method takes care of keeping the App's state consistent with the new manifest.

Returns the old Manifest if successful, or a tuple of an error value and manifest otherwise.

impl<S: HttpService<B>, B, I> App<S, B, I>[src]

pub fn manifest(&self) -> &Manifest[src]

pub fn manifest_mut(&mut self) -> &mut Manifest[src]

pub fn credentials(&self) -> &Credentials[src]

pub fn router(&self) -> &Router[src]

pub fn router_mut(&mut self) -> &mut Router[src]

pub fn database_pool(&self) -> &Pool<ConnectionManager<SqliteConnection>>[src]

pub fn http_client(&self) -> &S[src]

Trait Implementations

impl<S, B, I> Future for App<S, B, I> where
    S: HttpService<B> + Clone + Send + Sync + 'static,
    S::Future: Send,
    S::ResponseBody: Send,
    <S::ResponseBody as Body>::Error: Error + Send + Sync + 'static,
    B: Default + From<Vec<u8>> + Send + 'static,
    I: TryStream,
    I::Ok: AsyncRead + AsyncWrite + Send + Unpin + 'static,
    I::Error: Error + Send + Sync + 'static, 
[src]

type Output = Result<()>

The type of value produced on completion.

impl<S, B, I> PinnedDrop for App<S, B, I> where
    S: HttpService<B>, 
[src]

impl<'pin, S, B, I> Unpin for App<S, B, I> where
    S: HttpService<B>,
    __App<'pin, S, B, I>: Unpin
[src]

impl<S, B, I> UnsafeUnpin for App<S, B, I> where
    S: HttpService<B>, 
[src]

Auto Trait Implementations

impl<S, B, I = Listener<TcpListener, MaybeUnixListener>> !RefUnwindSafe for App<S, B, I>

impl<S, B, I> Send for App<S, B, I> where
    B: Send,
    I: Send,
    S: Send + Sync,
    <<S as HttpService<B>>::ResponseBody as Body>::Error: Send,
    <S as HttpService<B>>::Future: Send,
    <S as HttpService<B>>::ResponseBody: Body + Send

impl<S, B, I> Sync for App<S, B, I> where
    B: Sync,
    I: Sync,
    S: Send + Sync,
    <<S as HttpService<B>>::ResponseBody as Body>::Error: Sync,
    <S as HttpService<B>>::Future: Sync,
    <S as HttpService<B>>::ResponseBody: Body + Sync

impl<S, B, I = Listener<TcpListener, MaybeUnixListener>> !UnwindSafe for App<S, B, I>

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> FutureExt for T where
    T: Future + ?Sized
[src]

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

impl<T> IntoSql for 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<F, T, E> TryFuture for F where
    F: Future<Output = Result<T, E>> + ?Sized
[src]

type Ok = T

The type of successful values yielded by this future

type Error = E

The type of failures yielded by this future

impl<Fut> TryFutureExt for Fut where
    Fut: TryFuture + ?Sized
[src]

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