[][src]Struct xain_fl::aggregator::rpc::Client

pub struct Client<C = Channel<RpcRequest, RpcResponse>>(_);

The client stub that makes RPC calls to the server. Exposes a Future interface.

Methods

impl RpcClient[src]

pub fn new<T>(
    config: Config,
    transport: T
) -> NewClient<Self, RequestDispatch<RpcRequest, RpcResponse, T>> where
    T: Transport<ClientMessage<RpcRequest>, Response<RpcResponse>>, 
[src]

Returns a new client stub that sends requests over the given transport.

impl<C> RpcClient<C> where
    C: Client<'a, RpcRequest, Response = RpcResponse>, 
[src]

pub fn select(
    &mut self,
    ctx: Context,
    credentials: Credentials
) -> impl Future<Output = Result<Result<(), ()>>> + '_
[src]

Notify the aggregator that the given client has been selected and should use the given token to download the global weights and upload their local weights.

pub fn aggregate(
    &mut self,
    ctx: Context
) -> impl Future<Output = Result<Result<(), ()>>> + '_
[src]

Notify the aggregator that it should clear its pool of client IDs and tokens. This should be called before starting a new round.

Trait Implementations

impl<C: Clone> Clone for RpcClient<C>[src]

impl<C: Debug> Debug for RpcClient<C>[src]

impl<C> From<C> for RpcClient<C> where
    C: Client<'a, RpcRequest, Response = RpcResponse>, 
[src]

Auto Trait Implementations

impl<C> RefUnwindSafe for RpcClient<C> where
    C: RefUnwindSafe

impl<C> Send for RpcClient<C> where
    C: Send

impl<C> Sync for RpcClient<C> where
    C: Sync

impl<C> Unpin for RpcClient<C> where
    C: Unpin

impl<C> UnwindSafe for RpcClient<C> where
    C: UnwindSafe

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

impl<T> FromPy<T> for T[src]

impl<T> Instrument for T[src]

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

impl<T, U> IntoPy<U> for T where
    U: FromPy<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]