Trait capnp::private::capability::ClientHook [] [src]

pub trait ClientHook {
    fn add_ref(&self) -> Box<ClientHook>;
    fn new_call(&self,
                interface_id: u64,
                method_id: u16,
                size_hint: Option<MessageSize>)
                -> Request<Owned, Owned>; fn call(&self,
            interface_id: u64,
            method_id: u16,
            params: Box<ParamsHook>,
            results: Box<ResultsHook>)
            -> Promise<(), Error>; fn get_brand(&self) -> usize; fn get_ptr(&self) -> usize; fn get_resolved(&self) -> Option<Box<ClientHook>>; fn when_more_resolved(&self) -> Option<Promise<Box<ClientHook>, Error>>; }

Required Methods

If this ClientHook is a promise that has already resolved, returns the inner, resolved version of the capability. The caller may permanently replace this client with the resolved one if desired. Returns null if the client isn't a promise or hasn't resolved yet -- use whenMoreResolved() to distinguish between them.

If this client is a settled reference (not a promise), return nullptr. Otherwise, return a promise that eventually resolves to a new client that is closer to being the final, settled client (i.e. the value eventually returned by getResolved()). Calling this repeatedly should eventually produce a settled client.

Implementors