pub struct Prediction {
pub id: String,
pub model: String,
pub version: String,
pub input: Value,
pub status: PredictionStatus,
pub created_at: String,
pub urls: PredictionUrls,
pub output: Option<Value>,
}
Expand description
Details for a specific prediction
Fields§
§id: String
Id of the prediction
model: String
Model used during the prediction
version: String
Specific version used during prediction
input: Value
The inputs provided for the specific prediction
status: PredictionStatus
The current status of the prediction
created_at: String
The created time for the prediction
urls: PredictionUrls
Urls to either retrieve or cancel details for this prediction
output: Option<Value>
The output of the prediction if completed
Implementations§
Source§impl Prediction
impl Prediction
Sourcepub async fn reload(&mut self) -> Result<()>
pub async fn reload(&mut self) -> Result<()>
Leverage the get url provided, to refresh struct attributes
Sourcepub async fn get_status(&mut self) -> PredictionStatus
pub async fn get_status(&mut self) -> PredictionStatus
Get the status for the current prediction
Sourcepub async fn get_stream(
&mut self,
) -> Result<EventStream<impl Stream<Item = Result<Bytes>>>>
pub async fn get_stream( &mut self, ) -> Result<EventStream<impl Stream<Item = Result<Bytes>>>>
Get the stream from a prediction
Trait Implementations§
Source§impl Debug for Prediction
impl Debug for Prediction
Source§impl<'de> Deserialize<'de> for Prediction
impl<'de> Deserialize<'de> for Prediction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Prediction
impl RefUnwindSafe for Prediction
impl Send for Prediction
impl Sync for Prediction
impl Unpin for Prediction
impl UnwindSafe for Prediction
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