[][src]Struct grin_wallet::controller::OwnerAPIHandler

pub struct OwnerAPIHandler<T: ?Sized, C, K> where
    T: WalletBackend<C, K> + Send + Sync + 'static,
    C: NodeClient + 'static,
    K: Keychain + 'static, 
{ pub wallet: Arc<Mutex<T>>, // some fields omitted }

API Handler/Wrapper for owner functions

Fields

wallet: Arc<Mutex<T>>

Wallet instance

Methods

impl<T: ?Sized, C, K> OwnerAPIHandler<T, C, K> where
    T: WalletBackend<C, K> + Send + Sync + 'static,
    C: NodeClient + 'static,
    K: Keychain + 'static, 
[src]

pub fn new(wallet: Arc<Mutex<T>>) -> OwnerAPIHandler<T, C, K>
[src]

Create a new owner API handler for GET methods

pub fn retrieve_outputs(
    &self,
    req: &Request<Body>,
    api: APIOwner<T, C, K>
) -> Result<(bool, Vec<(OutputData, Commitment)>), Error>
[src]

pub fn retrieve_txs(
    &self,
    req: &Request<Body>,
    api: APIOwner<T, C, K>
) -> Result<(bool, Vec<TxLogEntry>), Error>
[src]

pub fn retrieve_stored_tx(
    &self,
    req: &Request<Body>,
    api: APIOwner<T, C, K>
) -> Result<(bool, Option<Transaction>), Error>
[src]

pub fn retrieve_summary_info(
    &self,
    req: &Request<Body>,
    api: APIOwner<T, C, K>
) -> Result<(bool, WalletInfo), Error>
[src]

pub fn node_height(
    &self,
    _req: &Request<Body>,
    api: APIOwner<T, C, K>
) -> Result<(u64, bool), Error>
[src]

pub fn issue_send_tx(
    &self,
    req: Request<Body>,
    api: APIOwner<T, C, K>
) -> Box<dyn Future<Item = Slate, Error = Error> + Send>
[src]

pub fn finalize_tx(
    &self,
    req: Request<Body>,
    api: APIOwner<T, C, K>
) -> Box<dyn Future<Item = Slate, Error = Error> + Send>
[src]

pub fn cancel_tx(
    &self,
    req: Request<Body>,
    api: APIOwner<T, C, K>
) -> Box<dyn Future<Item = (), Error = Error> + Send>
[src]

pub fn post_tx(
    &self,
    req: Request<Body>,
    api: APIOwner<T, C, K>
) -> Box<dyn Future<Item = (), Error = Error> + Send>
[src]

Trait Implementations

impl<T: ?Sized, C, K> Handler for OwnerAPIHandler<T, C, K> where
    T: WalletBackend<C, K> + Send + Sync + 'static,
    C: NodeClient + 'static,
    K: Keychain + 'static, 
[src]

fn put(
    &self,
    _req: Request<Body>
) -> Box<dyn Future<Item = Response<Body>, Error = Error> + 'static + Send>
[src]

fn patch(
    &self,
    _req: Request<Body>
) -> Box<dyn Future<Item = Response<Body>, Error = Error> + 'static + Send>
[src]

fn delete(
    &self,
    _req: Request<Body>
) -> Box<dyn Future<Item = Response<Body>, Error = Error> + 'static + Send>
[src]

fn head(
    &self,
    _req: Request<Body>
) -> Box<dyn Future<Item = Response<Body>, Error = Error> + 'static + Send>
[src]

fn trace(
    &self,
    _req: Request<Body>
) -> Box<dyn Future<Item = Response<Body>, Error = Error> + 'static + Send>
[src]

fn connect(
    &self,
    _req: Request<Body>
) -> Box<dyn Future<Item = Response<Body>, Error = Error> + 'static + Send>
[src]

fn call(
    &self,
    req: Request<Body>,
    _handlers: Box<dyn Iterator<Item = Arc<dyn Handler + 'static + Sync + Send>> + 'static>
) -> Box<dyn Future<Item = Response<Body>, Error = Error> + 'static + Send>
[src]

Auto Trait Implementations

impl<T: ?Sized, C, K> Send for OwnerAPIHandler<T, C, K>

impl<T: ?Sized, C, K> Sync for OwnerAPIHandler<T, C, K>

Blanket Implementations

impl<T> From for T
[src]

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

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T

impl<T> UnsafeAny for T where
    T: Any

impl<T> SafeBorrow for T where
    T: ?Sized

impl<T> Same for T

type Output = T

Should always be Self