Struct Server

Source
pub struct Server<AR, CE, CC, PE, PC, WE, WC> { /* private fields */ }
Available on crate feature server only.

Implementations§

Source§

impl<AR, CE, CC, PE, PC, WE, WC> Server<AR, CE, CC, PE, PC, WE, WC>

Source

pub fn auth<AR2>(self, auth_request: AR2) -> Server<AR2, CE, CC, PE, PC, WE, WC>

Source

pub fn channel_request<CE2, CC2>( self, channel_entrypoint: CE2, channel_callback: CC2, ) -> Server<AR, CE2, CC2, PE, PC, WE, WC>

Source

pub fn pay_request<PE2, PC2>( self, pay_entrypoint: PE2, pay_callback: PC2, ) -> Server<AR, CE, CC, PE2, PC2, WE, WC>

Source

pub fn withdraw_request<WE2, WC2>( self, withdraw_entrypoint: WE2, withdraw_callback: WC2, ) -> Server<AR, CE, CC, PE, PC, WE2, WC2>

Source§

impl<AR, ARFut, CE, CQFut, CC, CCFut, PE, PEFut, PC, PCFut, WE, WEFut, WC, WCFut> Server<AR, CE, CC, PE, PC, WE, WC>
where AR: 'static + Send + Clone + Fn(Callback) -> ARFut, ARFut: Send + Future<Output = Result<CallbackResponse, StatusCode>>, CE: 'static + Send + Clone + Fn(()) -> CQFut, CQFut: Send + Future<Output = Result<Entrypoint, StatusCode>>, CC: 'static + Send + Clone + Fn(Callback) -> CCFut, CCFut: Send + Future<Output = Result<CallbackResponse, StatusCode>>, PE: 'static + Send + Clone + Fn(Option<String>) -> PEFut, PEFut: Send + Future<Output = Result<Entrypoint, StatusCode>>, PC: 'static + Send + Clone + Fn(Callback) -> PCFut, PCFut: Send + Future<Output = Result<CallbackResponse, StatusCode>>, WE: 'static + Send + Clone + Fn(()) -> WEFut, WEFut: Send + Future<Output = Result<Entrypoint, StatusCode>>, WC: 'static + Send + Clone + Fn(Callback) -> WCFut, WCFut: Send + Future<Output = Result<CallbackResponse, StatusCode>>,

Source

pub fn build(self) -> Router<()>

Trait Implementations§

Source§

impl Default for Server<fn(Callback) -> Unimplemented<CallbackResponse>, fn(()) -> Unimplemented<Entrypoint>, fn(Callback) -> Unimplemented<CallbackResponse>, fn(Option<String>) -> Unimplemented<Entrypoint>, fn(Callback) -> Unimplemented<CallbackResponse>, fn(()) -> Unimplemented<Entrypoint>, fn(Callback) -> Unimplemented<CallbackResponse>>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<AR, CE, CC, PE, PC, WE, WC> Freeze for Server<AR, CE, CC, PE, PC, WE, WC>
where AR: Freeze, CE: Freeze, CC: Freeze, PE: Freeze, PC: Freeze, WE: Freeze, WC: Freeze,

§

impl<AR, CE, CC, PE, PC, WE, WC> RefUnwindSafe for Server<AR, CE, CC, PE, PC, WE, WC>

§

impl<AR, CE, CC, PE, PC, WE, WC> Send for Server<AR, CE, CC, PE, PC, WE, WC>
where AR: Send, CE: Send, CC: Send, PE: Send, PC: Send, WE: Send, WC: Send,

§

impl<AR, CE, CC, PE, PC, WE, WC> Sync for Server<AR, CE, CC, PE, PC, WE, WC>
where AR: Sync, CE: Sync, CC: Sync, PE: Sync, PC: Sync, WE: Sync, WC: Sync,

§

impl<AR, CE, CC, PE, PC, WE, WC> Unpin for Server<AR, CE, CC, PE, PC, WE, WC>
where AR: Unpin, CE: Unpin, CC: Unpin, PE: Unpin, PC: Unpin, WE: Unpin, WC: Unpin,

§

impl<AR, CE, CC, PE, PC, WE, WC> UnwindSafe for Server<AR, CE, CC, PE, PC, WE, WC>
where AR: UnwindSafe, CE: UnwindSafe, CC: UnwindSafe, PE: UnwindSafe, PC: UnwindSafe, WE: UnwindSafe, WC: 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> 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 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>,

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<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> ErasedDestructor for T
where T: 'static,