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

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

Notable traits for Promise<T, E>

impl<T, E> Future for Promise<T, E> type Output = Result<T, E>;
;
pub fn get_brand(&self) -> usize;
pub fn get_ptr(&self) -> usize;
pub fn get_resolved(&self) -> Option<Box<dyn ClientHook>>;
pub fn when_more_resolved(
        &self
    ) -> Option<Promise<Box<dyn ClientHook>, Error>>;
pub fn when_resolved(&self) -> Promise<(), Error>

Notable traits for Promise<T, E>

impl<T, E> Future for Promise<T, E> type Output = Result<T, E>;
; }

Required methods

pub fn add_ref(&self) -> Box<dyn ClientHook>[src]

pub fn new_call(
    &self,
    interface_id: u64,
    method_id: u16,
    size_hint: Option<MessageSize>
) -> Request<Owned, Owned>
[src]

pub fn call(
    &self,
    interface_id: u64,
    method_id: u16,
    params: Box<dyn ParamsHook>,
    results: Box<dyn ResultsHook>
) -> Promise<(), Error>

Notable traits for Promise<T, E>

impl<T, E> Future for Promise<T, E> type Output = Result<T, E>;
[src]

pub fn get_brand(&self) -> usize[src]

pub fn get_ptr(&self) -> usize[src]

pub fn get_resolved(&self) -> Option<Box<dyn ClientHook>>[src]

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.

pub fn when_more_resolved(&self) -> Option<Promise<Box<dyn ClientHook>, Error>>[src]

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.

pub fn when_resolved(&self) -> Promise<(), Error>

Notable traits for Promise<T, E>

impl<T, E> Future for Promise<T, E> type Output = Result<T, E>;
[src]

Repeatedly calls whenMoreResolved() until it returns nullptr.

Loading content...

Implementors

Loading content...