Struct machinebox::tagbox::Tagbox
[−]
[src]
pub struct Tagbox { /* fields omitted */ }
The client for the tagbox
machine box.
Methods
impl Tagbox
[src]
pub fn new(url: &str) -> Tagbox
[src]
Creates a new tagbox client connecting to the supplied URL.
pub fn check<T: Read + Send + 'static>(
&self,
reader: T
) -> Result<CheckResponse, Error>
[src]
&self,
reader: T
) -> Result<CheckResponse, Error>
Gets the tags for the image to which reader
points
pub fn check_path(&self, source_path: &str) -> Result<CheckResponse, Error>
[src]
Gets the tags for the image at source_path
pub fn check_base64(&self, data: &str) -> Result<CheckResponse, Error>
[src]
Gets the tags for the image contained in the base64 encoded data
pub fn check_url(&self, image_url: &str) -> Result<CheckResponse, Error>
[src]
Gets the tags for the image at the given URL
pub fn teach_url(
&self,
image_url: &str,
tag: &str,
id: Option<String>
) -> Result<(), Error>
[src]
&self,
image_url: &str,
tag: &str,
id: Option<String>
) -> Result<(), Error>
Teaches the tagbox the image with a custom tag at the specified URL
pub fn remove_custom_tag(&self, id: &str) -> Result<(), Error>
[src]
Deletes a custom tag by its ID
pub fn rename_custom_tag(&self, id: &str, tag: &str) -> Result<(), Error>
[src]
Renames a custom tag with the indicated ID
pub fn similar_file(&self, source_path: &str) -> Result<Vec<Tag>, Error>
[src]
Checks the image file at source_path
for similar images based on previously
taught tags
pub fn similar_url(&self, image_url: &str) -> Result<Vec<Tag>, Error>
[src]
Checks the image at the image_url
for similar images based on previously
taught tags.
pub fn similar_base64(&self, data: &str) -> Result<Vec<Tag>, Error>
[src]
Checks the image within the base64 encoded string for similar images based on previously taught tags.
pub fn download_state<W>(&self, buf: &mut W) -> Result<u64, Error> where
W: Write,
[src]
W: Write,
Downloads the state of the tagbox into the buf
buffer, returning
the number of bytes written
pub fn post_state(&self, source_path: &str) -> Result<(), Error>
[src]
Submits the state file indicated by the source_path
parameter to the tagbox
pub fn post_state_url(&self, state_url: &str) -> Result<(), Error>
[src]
Submits a state URL to the tagbox
Trait Implementations
impl BoxClient for Tagbox
[src]
fn url(&self) -> &str
[src]
Indicates the URL of the box
fn info(&self) -> Result<BoxInfo, Error>
[src]
Provides information about the box
fn health(&self) -> Result<Health, Error>
[src]
Checks the health of the box
fn is_live(&self) -> Result<bool, Error>
[src]
Determines whether the box is live
fn is_ready(&self) -> Result<bool, Error>
[src]
Determines if the box is ready. Some boxes may take a while to start up, so you can use this function to check if it is acceptable to start using the box-specific functionality Read more