[][src]Struct dsf_client::client::Client

pub struct Client { /* fields omitted */ }

Implementations

impl Client[src]

pub fn new(options: &Options) -> Result<Self, Error>[src]

Create a new client

pub async fn request<'_>(
    &'_ mut self,
    rk: RequestKind
) -> Result<ResponseKind, Error>
[src]

Issue a request to the daemon using a client instance, returning a response

pub async fn status<'_>(&'_ mut self) -> Result<StatusInfo, Error>[src]

Fetch daemon status information

pub async fn connect<'_>(
    &'_ mut self,
    options: ConnectOptions
) -> Result<ConnectInfo, Error>
[src]

Connect to another DSF instance

pub async fn find<'_>(
    &'_ mut self,
    options: SearchOptions
) -> Result<PeerInfo, Error>
[src]

Search for a peer using the database

pub async fn list<'_>(
    &'_ mut self,
    options: ListOptions
) -> Result<Vec<ServiceInfo>, Error>
[src]

List known services

pub async fn info<'_>(
    &'_ mut self,
    options: InfoOptions
) -> Result<(ServiceHandle, ServiceInfo), Error>
[src]

Fetch information for a given service

pub async fn create<'_>(
    &'_ mut self,
    options: CreateOptions
) -> Result<ServiceHandle, Error>
[src]

Create a new service with the provided options This MUST be stored locally for reuse

pub async fn register<'_>(
    &'_ mut self,
    options: RegisterOptions
) -> Result<RegisterInfo, Error>
[src]

Register a service instance in the distributed database

pub async fn locate<'_>(
    &'_ mut self,
    options: LocateOptions
) -> Result<(ServiceHandle, LocateInfo), Error>
[src]

Locate a service instance in the distributed database This returns a future that will resolve to the desired service or an error

pub async fn publish<'_>(
    &'_ mut self,
    options: PublishOptions
) -> Result<PublishInfo, Error>
[src]

Publish data using an existing service

pub async fn subscribe<'_>(
    &'_ mut self,
    options: SubscribeOptions
) -> Result<impl Stream<Item = ResponseKind>, Error>
[src]

Subscribe to data from a given service

pub async fn data<'_>(
    &'_ mut self,
    options: ListOptions
) -> Result<Vec<DataInfo>, Error>
[src]

Fetch data from a given service

Trait Implementations

impl Debug for Client[src]

Auto Trait Implementations

impl !RefUnwindSafe for Client

impl Send for Client

impl Sync for Client

impl Unpin for Client

impl !UnwindSafe for Client

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> Instrument for T[src]

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

impl<T> IntoSql for T

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]