pub trait FromClientHook {
    fn new(hook: Box<dyn ClientHook>) -> Self;
    fn into_client_hook(self) -> Box<dyn ClientHook>;
    fn as_client_hook(&self) -> &dyn ClientHook;

    fn cast_to<T: FromClientHook + Sized>(self) -> T
    where
        Self: Sized
, { ... } }
Expand description

Trait implemented (via codegen) by all user-defined capability client types.

Required Methods§

Wraps a client hook to create a new client.

Unwraps client to get the underlying client hook.

Gets a reference to the underlying client hook.

Provided Methods§

Casts self to another instance of FromClientHook. This always succeeds, but if the underlying capability does not actually implement T’s interface, then method calls will fail with “unimplemented” errors.

Implementors§