pub struct Response { /* private fields */ }Implementations§
Source§impl Response
impl Response
Sourcepub fn get_outputs(&self) -> &[Output]
pub fn get_outputs(&self) -> &[Output]
The results of the inference.
Sourcepub fn get_output<O: AsRef<str>>(&self, output_name: O) -> Option<&Output>
pub fn get_output<O: AsRef<str>>(&self, output_name: O) -> Option<&Output>
Get output_name result of the inference.
Sourcepub async fn return_buffers(self) -> Result<HashMap<String, Buffer>, Error>
pub async fn return_buffers(self) -> Result<HashMap<String, Buffer>, Error>
Deconstruct the Response and get all the allocated output buffers back.
If you want just an immutable result of the inference, use Response::get_outputs or Response::get_output method.
Sourcepub fn model(&self) -> Result<(&str, i64), Error>
pub fn model(&self) -> Result<(&str, i64), Error>
Get model name and version used to produce thr response.
Sourcepub fn id(&self) -> Result<String, Error>
pub fn id(&self) -> Result<String, Error>
Get the ID of the request corresponding to the response.
Sourcepub fn parameters(&self) -> Vec<Parameter>
pub fn parameters(&self) -> Vec<Parameter>
Get all information about the response parameters.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Response
impl !RefUnwindSafe for Response
impl Unpin for Response
impl !UnwindSafe for Response
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