pub struct DaemonApiClient<Stub = Channel<DaemonApiRequest, DaemonApiResponse>>(/* private fields */);Expand description
The client stub that makes RPC calls to the server. All request methods return Futures.
Implementations§
source§impl DaemonApiClient
impl DaemonApiClient
sourcepub fn new<T>(
config: Config,
transport: T,
) -> NewClient<Self, RequestDispatch<DaemonApiRequest, DaemonApiResponse, T>>
pub fn new<T>( config: Config, transport: T, ) -> NewClient<Self, RequestDispatch<DaemonApiRequest, DaemonApiResponse, T>>
Returns a new client stub that sends requests over the given transport.
source§impl<Stub> DaemonApiClient<Stub>
impl<Stub> DaemonApiClient<Stub>
pub fn initialize( &self, ctx: Context, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
sourcepub fn get_key_bundle(
&self,
ctx: Context,
) -> impl Future<Output = Result<Result<KeyBundle>, RpcError>> + '_
pub fn get_key_bundle( &self, ctx: Context, ) -> impl Future<Output = Result<Result<KeyBundle>, RpcError>> + '_
Gets the public key bundle for this device
sourcepub fn get_device_id(
&self,
ctx: Context,
) -> impl Future<Output = Result<Result<DeviceId>, RpcError>> + '_
pub fn get_device_id( &self, ctx: Context, ) -> impl Future<Output = Result<Result<DeviceId>, RpcError>> + '_
Gets the public device id.
sourcepub fn add_sync_peer(
&self,
ctx: Context,
addr: Addr,
team: TeamId,
interval: Duration,
) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn add_sync_peer( &self, ctx: Context, addr: Addr, team: TeamId, interval: Duration, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
Adds the peer for automatic periodic syncing.
sourcepub fn remove_sync_peer(
&self,
ctx: Context,
addr: Addr,
team: TeamId,
) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn remove_sync_peer( &self, ctx: Context, addr: Addr, team: TeamId, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
Removes the peer from automatic syncing.
sourcepub fn add_team(
&self,
ctx: Context,
team: TeamId,
) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn add_team( &self, ctx: Context, team: TeamId, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
add a team to the local device store that was created by someone else. Not an aranya action/command.
sourcepub fn remove_team(
&self,
ctx: Context,
team: TeamId,
) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn remove_team( &self, ctx: Context, team: TeamId, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
remove a team from the local device store.
sourcepub fn create_team(
&self,
ctx: Context,
) -> impl Future<Output = Result<Result<TeamId>, RpcError>> + '_
pub fn create_team( &self, ctx: Context, ) -> impl Future<Output = Result<Result<TeamId>, RpcError>> + '_
Create a new graph/team with the current device as the owner.
pub fn close_team( &self, ctx: Context, team: TeamId, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn add_device_to_team( &self, ctx: Context, team: TeamId, keys: KeyBundle, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn remove_device_from_team( &self, ctx: Context, team: TeamId, device: DeviceId, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn assign_role( &self, ctx: Context, team: TeamId, device: DeviceId, role: Role, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn revoke_role( &self, ctx: Context, team: TeamId, device: DeviceId, role: Role, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn assign_net_name( &self, ctx: Context, team: TeamId, device: DeviceId, name: NetIdentifier, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn remove_net_name( &self, ctx: Context, team: TeamId, device: DeviceId, name: NetIdentifier, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn create_label( &self, ctx: Context, team: TeamId, label: Label, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn delete_label( &self, ctx: Context, team: TeamId, label: Label, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn assign_label( &self, ctx: Context, team: TeamId, device: DeviceId, label: Label, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn revoke_label( &self, ctx: Context, team: TeamId, device: DeviceId, label: Label, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn create_channel( &self, ctx: Context, team: TeamId, peer: NetIdentifier, label: Label, ) -> impl Future<Output = Result<Result<(ChannelId, NodeId, AfcCtrl)>, RpcError>> + '_
pub fn delete_channel( &self, ctx: Context, chan: ChannelId, ) -> impl Future<Output = Result<Result<AfcCtrl>, RpcError>> + '_
pub fn receive_afc_ctrl( &self, ctx: Context, ctrl: AfcCtrl, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
Trait Implementations§
source§impl<Stub: Clone> Clone for DaemonApiClient<Stub>
impl<Stub: Clone> Clone for DaemonApiClient<Stub>
source§fn clone(&self) -> DaemonApiClient<Stub>
fn clone(&self) -> DaemonApiClient<Stub>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<Stub: Debug> Debug for DaemonApiClient<Stub>
impl<Stub: Debug> Debug for DaemonApiClient<Stub>
source§impl<Stub> From<Stub> for DaemonApiClient<Stub>
impl<Stub> From<Stub> for DaemonApiClient<Stub>
Auto Trait Implementations§
impl<Stub> Freeze for DaemonApiClient<Stub>where
Stub: Freeze,
impl<Stub> RefUnwindSafe for DaemonApiClient<Stub>where
Stub: RefUnwindSafe,
impl<Stub> Send for DaemonApiClient<Stub>where
Stub: Send,
impl<Stub> Sync for DaemonApiClient<Stub>where
Stub: Sync,
impl<Stub> Unpin for DaemonApiClient<Stub>where
Stub: Unpin,
impl<Stub> UnwindSafe for DaemonApiClient<Stub>where
Stub: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)