Expand description
The openiap.client crate provides the Client struct and its methods.
For now this only support grpc, will over time have added support for web sockets, http, tcp and named pipes.
Initialize a new client, by calling the Client::new_connect method.
use openiap_client::{OpenIAPError, Client, QueryRequest};
#[tokio::main]
async fn main() -> Result<(), OpenIAPError> {
let client = Client::new_connect("").await?;
let q = client.query( QueryRequest::with_projection(
"entities",
"{}",
"{\"name\":1}"
)).await?;
let items: serde_json::Value = serde_json::from_str(&q.results).unwrap();
let items: &Vec<serde_json::Value> = items.as_array().unwrap();
for item in items {
println!("Item: {:?}", item);
}
Ok(())
}Modules§
- The
agentmodule provides theAgentstruct and its methods. - The
basemodule provides theCustomCommandRequeststruct and its methods. - The
downloadmodule provides theDownloadstruct and its methods. - The
errorsmodule provides theErrorstruct and its methods. - Generated client implementations.
- Generated server implementations.
- The
protosmodule provides theEnvelope,ErrorResponse,SigninRequest,SigninResponse,RegisterQueueRequest,UnRegisterQueueRequest,RegisterExchangeRequest,WatchRequest,UnWatchRequest,QueueMessageRequest,QueryRequest,QueryResponse,UploadRequest,UploadResponse,DownloadRequest,DownloadResponse,WorkItem, andWorkItemResponsestructs and their methods. - The
querymodule provides theQuerystruct and its methods. - The
queuemodule provides theRegisterQueueRequest,UnRegisterQueueRequest,RegisterExchangeRequest,WatchRequest,UnWatchRequest, andQueueMessageRequeststructs and their methods. - The
signinmodule provides theSigninRequeststruct and its methods. - The
uploadmodule provides theUploadstruct and its methods. - The
workitemmodule provides theWorkItemstruct and its methods.
Structs§
- The
Clientstruct provides the client for the OpenIAP service. Initialize a new client, by calling the Client::new_connect method. - The
ClientInnerstruct provides the inner client for the OpenIAP service. - The
Configstruct provides the configuration for the OpenIAP service we are connecting to. - Service for managing OpenIAP Flow (OpenFlow)
- MongoDB Query Request.
- A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.
Enums§
- Client enum, used to determine which client to use.
- Client event enum, used to determine which event has occurred.
- Error type for OpenIAP
Functions§
- Enable global tracing ( cannot be updated once set )\