[−][src]Struct bigml::Client
A client connection to BigML.
Implementations
impl Client
[src]
pub fn new<S1, S2>(username: S1, api_key: S2) -> Result<Client> where
S1: Into<String>,
S2: Into<String>,
[src]
S1: Into<String>,
S2: Into<String>,
Create a new Client
that will connect to DEFAULT_BIGML_DOMAIN
.
pub fn new_with_domain<S1, S2>(
domain: &str,
username: S1,
api_key: S2
) -> Result<Client> where
S1: Into<String>,
S2: Into<String>,
[src]
domain: &str,
username: S1,
api_key: S2
) -> Result<Client> where
S1: Into<String>,
S2: Into<String>,
Create a new Client
, specifying the BigML domain to connect to. Use
this if you have a specially hosted BigML instance.
pub fn new_from_env() -> Result<Client>
[src]
Create a new client, using the environment variables BIGML_USERNAME
,
BIGML_API_KEY
and optionally BIGML_DOMAIN
to configure it.
pub async fn create<'a, Args>(
&'a self,
args: &'a Args
) -> Result<Args::Resource> where
Args: Args,
[src]
&'a self,
args: &'a Args
) -> Result<Args::Resource> where
Args: Args,
Create a new resource.
pub async fn create_and_wait<'a, Args>(
&'a self,
args: &'a Args
) -> Result<Args::Resource> where
Args: Args,
[src]
&'a self,
args: &'a Args
) -> Result<Args::Resource> where
Args: Args,
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>,
[src]
&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.
pub async fn create_source_from_path(&self, path: PathBuf) -> Result<Source>
[src]
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.
pub async fn create_source_from_path_and_wait(
&self,
path: PathBuf
) -> Result<Source>
[src]
&self,
path: PathBuf
) -> Result<Source>
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.
pub async fn update<'a, R: Resource + Updatable>(
&'a self,
resource: &'a Id<R>,
update: &'a <R as Updatable>::Update
) -> Result<()>
[src]
&'a self,
resource: &'a Id<R>,
update: &'a <R as Updatable>::Update
) -> Result<()>
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.
pub async fn fetch<'a, R: Resource>(&'a self, resource: &'a Id<R>) -> Result<R>
[src]
Fetch an existing resource.
pub async fn wait<'a, R: Resource>(&'a self, resource: &'a Id<R>) -> Result<R>
[src]
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>
[src]
&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
.
pub async fn download<'a, R: Resource>(
&'a self,
resource: &'a Id<R>
) -> Result<Response>
[src]
&'a self,
resource: &'a Id<R>
) -> Result<Response>
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>
[src]
&'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.
pub async fn delete<'a, R: Resource>(
&'a self,
resource: &'a Id<R>
) -> Result<()>
[src]
&'a self,
resource: &'a Id<R>
) -> Result<()>
Delete the specified resource.
Auto Trait Implementations
impl RefUnwindSafe for Client
[src]
impl Send for Client
[src]
impl Sync for Client
[src]
impl Unpin for Client
[src]
impl UnwindSafe for Client
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,