pub struct ForeignAPIHandlerV2<L, C, K>{
pub wallet: Arc<Mutex<Box<dyn WalletInst<'static, L, C, K> + 'static>>>,
pub keychain_mask: Arc<Mutex<Option<SecretKey>>>,
pub test_mode: bool,
pub tor_config: Mutex<Option<TorConfig>>,
}
Expand description
V2 API Handler/Wrapper for foreign functions
Fields§
§wallet: Arc<Mutex<Box<dyn WalletInst<'static, L, C, K> + 'static>>>
Wallet instance
keychain_mask: Arc<Mutex<Option<SecretKey>>>
Keychain mask
test_mode: bool
run in doctest mode
tor_config: Mutex<Option<TorConfig>>
tor config
Implementations§
Source§impl<L, C, K> ForeignAPIHandlerV2<L, C, K>
impl<L, C, K> ForeignAPIHandlerV2<L, C, K>
Trait Implementations§
Source§impl<L, C, K> Handler for ForeignAPIHandlerV2<L, C, K>
impl<L, C, K> Handler for ForeignAPIHandlerV2<L, C, K>
fn post(&self, req: Request<Body>) -> ResponseFuture
fn options(&self, _req: Request<Body>) -> ResponseFuture
fn get( &self, _req: Request<Body>, ) -> Pin<Box<dyn Future<Output = Result<Response<Body>, Error>> + Send>>
fn put( &self, _req: Request<Body>, ) -> Pin<Box<dyn Future<Output = Result<Response<Body>, Error>> + Send>>
fn patch( &self, _req: Request<Body>, ) -> Pin<Box<dyn Future<Output = Result<Response<Body>, Error>> + Send>>
fn delete( &self, _req: Request<Body>, ) -> Pin<Box<dyn Future<Output = Result<Response<Body>, Error>> + Send>>
fn head( &self, _req: Request<Body>, ) -> Pin<Box<dyn Future<Output = Result<Response<Body>, Error>> + Send>>
fn trace( &self, _req: Request<Body>, ) -> Pin<Box<dyn Future<Output = Result<Response<Body>, Error>> + Send>>
fn connect( &self, _req: Request<Body>, ) -> Pin<Box<dyn Future<Output = Result<Response<Body>, Error>> + Send>>
fn call( &self, req: Request<Body>, _handlers: Box<dyn Iterator<Item = Arc<dyn Handler + Send + Sync>>>, ) -> Pin<Box<dyn Future<Output = Result<Response<Body>, Error>> + Send>>
Auto Trait Implementations§
impl<L, C, K> !Freeze for ForeignAPIHandlerV2<L, C, K>
impl<L, C, K> !RefUnwindSafe for ForeignAPIHandlerV2<L, C, K>
impl<L, C, K> Send for ForeignAPIHandlerV2<L, C, K>
impl<L, C, K> Sync for ForeignAPIHandlerV2<L, C, K>
impl<L, C, K> Unpin for ForeignAPIHandlerV2<L, C, K>
impl<L, C, K> !UnwindSafe for ForeignAPIHandlerV2<L, C, K>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more