Struct bigml::Client [−][src]
pub struct Client { /* fields omitted */ }
Expand description
A client connection to BigML.
Implementations
Create a new Client
that will connect to DEFAULT_BIGML_DOMAIN
.
Create a new Client
, specifying the BigML domain to connect to. Use
this if you have a specially hosted BigML instance.
Create a new client, using the environment variables BIGML_USERNAME
,
BIGML_API_KEY
and optionally BIGML_DOMAIN
to configure it.
Create a new resource.
Create a new resource, and wait until it is ready.
pub async fn create_source_from_stream<S>(
&self,
filename: &str,
stream: S
) -> Result<Source> where
S: TryStream + Send + Sync + 'static,
S::Error: Into<Box<dyn Error + Send + Sync>>,
Bytes: From<S::Ok>,
👎 Deprecated: This won’t work until BigML fixes Transfer-Encoding: chunked
pub async fn create_source_from_stream<S>(
&self,
filename: &str,
stream: S
) -> Result<Source> where
S: TryStream + Send + Sync + 'static,
S::Error: Into<Box<dyn Error + Send + Sync>>,
Bytes: From<S::Ok>,
This won’t work until BigML fixes Transfer-Encoding: chunked
Create a BigML data source using data from the specified stream. We stream the data over the network without trying to load it all into memory at once.
👎 Deprecated: This won’t work until BigML fixes Transfer-Encoding: chunked
This won’t work until BigML fixes Transfer-Encoding: chunked
Create a BigML data source using data from the specified path. We stream the data over the network without trying to load it all into memory at once.
👎 Deprecated: This won’t work until BigML fixes Transfer-Encoding: chunked
This won’t work until BigML fixes Transfer-Encoding: chunked
Create a BigML data source using data from the specified path. We stream the data over the network without trying to load it all into memory.
Update the specified resource
using update
. We do not return the
updated resource because of peculiarities with BigML’s API, but you
can always use Client::fetch
if you need the updated version.
Fetch an existing resource.
Poll an existing resource, returning it once it’s ready.
If an underlying BigML error occurs, it can be accessed using
Error::original_bigml_error
.
pub async fn wait_opt<'a, 'b, R: Resource>(
&self,
resource: &'a Id<R>,
wait_options: &'a WaitOptions,
progress_options: &'a mut ProgressOptions<'b, R>
) -> Result<R>
pub async fn wait_opt<'a, 'b, R: Resource>(
&self,
resource: &'a Id<R>,
wait_options: &'a WaitOptions,
progress_options: &'a mut ProgressOptions<'b, R>
) -> Result<R>
Poll an existing resource, returning it once it’s ready, and honoring wait and progress options.
If an underlying BigML error occurs, it can be accessed using
Error::original_bigml_error
.
Download a resource as a CSV file. This only makes sense for certain kinds of resources.
pub async fn download_opt<'a, R: Resource>(
&'a self,
resource: &'a Id<R>,
options: &'a WaitOptions
) -> Result<Response>
pub async fn download_opt<'a, R: Resource>(
&'a self,
resource: &'a Id<R>,
options: &'a WaitOptions
) -> Result<Response>
Download a resource as a CSV file. This only makes sense for certain kinds of resources.
Auto Trait Implementations
impl RefUnwindSafe for Client
impl UnwindSafe for Client
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more