pub struct Client { /* private fields */ }Expand description
A client for invoking actions on and processing effects from the Aranya graph.
Client interacts with the Aranya daemon over
a platform-specific IPC mechanism.
Implementations§
Source§impl Client
impl Client
Sourcepub fn builder<'a>() -> ClientBuilder<'a>
pub fn builder<'a>() -> ClientBuilder<'a>
Returns a builder for Client.
Sourcepub async fn local_addr(&self) -> Result<Addr>
pub async fn local_addr(&self) -> Result<Addr>
Returns the address that the Aranya sync server is bound to.
Sourcepub async fn get_key_bundle(&self) -> Result<PublicKeyBundle>
👎Deprecated: Use get_public_key_bundle
pub async fn get_key_bundle(&self) -> Result<PublicKeyBundle>
get_public_key_bundleSourcepub async fn get_public_key_bundle(&self) -> Result<PublicKeyBundle>
pub async fn get_public_key_bundle(&self) -> Result<PublicKeyBundle>
Gets the public key bundle for this device.
Sourcepub async fn get_device_id(&self) -> Result<DeviceId>
pub async fn get_device_id(&self) -> Result<DeviceId>
Gets the public device ID for this device.
Sourcepub async fn create_team(&self, cfg: CreateTeamConfig) -> Result<Team<'_>>
pub async fn create_team(&self, cfg: CreateTeamConfig) -> Result<Team<'_>>
Create a new graph/team with the current device as the owner.
Sourcepub async fn rand(&self, buf: &mut [u8])
pub async fn rand(&self, buf: &mut [u8])
Generate random bytes from a CSPRNG. Can be used to generate IKM for a generating a PSK seed.
Sourcepub async fn add_team(&self, cfg: AddTeamConfig) -> Result<Team<'_>>
pub async fn add_team(&self, cfg: AddTeamConfig) -> Result<Team<'_>>
Add a team to local device storage.
Sourcepub async fn remove_team(&self, team_id: TeamId) -> Result<()>
pub async fn remove_team(&self, team_id: TeamId) -> Result<()>
Remove a team from local device storage.
Sourcepub fn afc(&self) -> AfcChannels
Available on crate feature afc only.
pub fn afc(&self) -> AfcChannels
afc only.Get access to Aranya Fast Channels.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin for Client
impl UnwindSafe for Client
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Returns whether the given value has been niched. Read more
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
Writes data to
out indicating that a T is niched.