pub struct ListModels<'a, S> { /* private fields */ }Expand description
A request for the model list, ready to be configured and sent.
Made by Models::list. Nothing is checked until
send.
Implementations§
Source§impl<'a, S> ListModels<'a, S>
impl<'a, S> ListModels<'a, S>
Sourcepub fn timeout(self, timeout: Duration) -> Self
pub fn timeout(self, timeout: Duration) -> Self
The deadline of each attempt of this call, instead of the client’s.
Sourcepub fn no_timeout(self) -> Self
pub fn no_timeout(self) -> Self
No deadline on any attempt of this call.
Sourcepub fn header(
self,
name: impl Into<Cow<'a, str>>,
value: impl Into<Cow<'a, str>>,
) -> Self
pub fn header( self, name: impl Into<Cow<'a, str>>, value: impl Into<Cow<'a, str>>, ) -> Self
A header for this call only; see
SystemOne::header.
Sourcepub fn retry(self, policy: RetryPolicy) -> Self
pub fn retry(self, policy: RetryPolicy) -> Self
The retry policy of this call, in place of the client’s; see
SystemOne::retry.
Source§impl<S> ListModels<'_, S>where
S: HttpService,
impl<S> ListModels<'_, S>where
S: HttpService,
Sourcepub async fn send(self) -> Result<ListModelsResponse, Error>
pub async fn send(self) -> Result<ListModelsResponse, Error>
Sends the request and decodes the list, retrying a failure as the call’s retry policy, or else the client’s, says. When retrying stops, the error is the one the last attempt failed with.
§Errors
ErrorKind::InvalidRequest, before anything is sent: a header that is not a valid header, or a deadline of zero.ErrorKind::Apifor a status outside 2xx.ErrorKind::Timeoutwhen the attempt ran past its deadline.ErrorKind::Connectionwhen no response could be read.ErrorKind::ResponseTooLargewhen a success response’s body was larger than the client’s limit.ErrorKind::ResponseValidationwhen the body is not a model list.
Trait Implementations§
Auto Trait Implementations§
impl<'a, S> !RefUnwindSafe for ListModels<'a, S>
impl<'a, S> !UnwindSafe for ListModels<'a, S>
impl<'a, S> Freeze for ListModels<'a, S>
impl<'a, S> Send for ListModels<'a, S>
impl<'a, S> Sync for ListModels<'a, S>
impl<'a, S> Unpin for ListModels<'a, S>
impl<'a, S> UnsafeUnpin for ListModels<'a, S>where
&'a Client<S>: UnsafeUnpin,
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