pub struct DecthingsClient {
pub dataset: DatasetRpc,
pub debug: DebugRpc,
pub fs: FsRpc,
pub image: ImageRpc,
pub language: LanguageRpc,
pub model: ModelRpc,
pub persistent_launcher: PersistentLauncherRpc,
pub spawned: SpawnedRpc,
pub terminal: TerminalRpc,
/* private fields */
}
Fields§
§dataset: DatasetRpc
§debug: DebugRpc
§fs: FsRpc
§image: ImageRpc
§language: LanguageRpc
§model: ModelRpc
§persistent_launcher: PersistentLauncherRpc
§spawned: SpawnedRpc
§terminal: TerminalRpc
Implementations§
source§impl DecthingsClient
impl DecthingsClient
pub fn new(options: DecthingsClientOptions) -> Self
sourcepub async fn raw_method_call<P: Serialize, D: AsRef<[u8]>>(
&self,
api: &str,
method: &str,
params: P,
data: impl AsRef<[D]>,
) -> Result<(Bytes, Vec<Bytes>), DecthingsClientError>
pub async fn raw_method_call<P: Serialize, D: AsRef<[u8]>>( &self, api: &str, method: &str, params: P, data: impl AsRef<[D]>, ) -> Result<(Bytes, Vec<Bytes>), DecthingsClientError>
Call an RPC method on the server.
You most likely want to use the helper classes (client.model, client.dataset, etc.) instead.
pub async fn on_event( &self, cb: impl Fn(&DecthingsEvent) + Send + Sync + 'static, ) -> EventListenerDisposer
pub async fn set_api_key(&self, api_key: String)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DecthingsClient
impl !RefUnwindSafe for DecthingsClient
impl Send for DecthingsClient
impl Sync for DecthingsClient
impl Unpin for DecthingsClient
impl !UnwindSafe for DecthingsClient
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