#[non_exhaustive]pub struct TaskListResponse {
pub tasks: Vec<Task>,
pub next_page_token: String,
pub page_size: u32,
pub total_size: u32,
}Expand description
Result object for ListTasks method containing an array of tasks and pagination information.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.tasks: Vec<Task>Array of tasks matching the specified criteria.
ProtoJSON printers omit empty repeated fields, so an official-SDK
server with zero matching tasks legitimately sends no tasks key.
next_page_token: StringA token to retrieve the next page of results, or empty if there are no more results in the list.
Empty on the last page; ProtoJSON omits an empty string, so absent reads as empty.
page_size: u32The page size used for this response.
total_size: u32Total number of tasks available (before pagination).
Implementations§
Source§impl TaskListResponse
impl TaskListResponse
Sourcepub fn new(tasks: Vec<Task>) -> TaskListResponse
pub fn new(tasks: Vec<Task>) -> TaskListResponse
Creates a single-page response.
Source§impl TaskListResponse
impl TaskListResponse
Sourcepub fn with_next_page_token(self, token: impl Into<String>) -> TaskListResponse
pub fn with_next_page_token(self, token: impl Into<String>) -> TaskListResponse
Sets the token for the next page. TaskListResponse::new leaves it
empty, which the protocol reads as “this is the last page”.
Sourcepub const fn with_page_size(self, n: u32) -> TaskListResponse
pub const fn with_page_size(self, n: u32) -> TaskListResponse
Sets the number of tasks in this page, where TaskListResponse::new
uses the length of the list it was given.
Sourcepub const fn with_total_size(self, n: u32) -> TaskListResponse
pub const fn with_total_size(self, n: u32) -> TaskListResponse
Sets the total number of matching tasks, where TaskListResponse::new
uses the length of the list it was given.
Trait Implementations§
Source§impl Clone for TaskListResponse
impl Clone for TaskListResponse
Source§fn clone(&self) -> TaskListResponse
fn clone(&self) -> TaskListResponse
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TaskListResponse
impl Debug for TaskListResponse
Source§impl<'de> Deserialize<'de> for TaskListResponse
impl<'de> Deserialize<'de> for TaskListResponse
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TaskListResponse, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TaskListResponse, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for TaskListResponse
impl Serialize for TaskListResponse
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Source§impl TryFrom<ListTasksResponse> for TaskListResponse
impl TryFrom<ListTasksResponse> for TaskListResponse
Source§type Error = ConvertError
type Error = ConvertError
Source§fn try_from(
value: ListTasksResponse,
) -> Result<TaskListResponse, <TaskListResponse as TryFrom<ListTasksResponse>>::Error>
fn try_from( value: ListTasksResponse, ) -> Result<TaskListResponse, <TaskListResponse as TryFrom<ListTasksResponse>>::Error>
Source§impl TryFrom<TaskListResponse> for ListTasksResponse
impl TryFrom<TaskListResponse> for ListTasksResponse
Source§type Error = ConvertError
type Error = ConvertError
Source§fn try_from(
value: TaskListResponse,
) -> Result<ListTasksResponse, <ListTasksResponse as TryFrom<TaskListResponse>>::Error>
fn try_from( value: TaskListResponse, ) -> Result<ListTasksResponse, <ListTasksResponse as TryFrom<TaskListResponse>>::Error>
Auto Trait Implementations§
impl Forget for TaskListResponse
impl Freeze for TaskListResponse
impl Move for TaskListResponse
impl RefUnwindSafe for TaskListResponse
impl Send for TaskListResponse
impl Sync for TaskListResponse
impl Unpin for TaskListResponse
impl UnsafeUnpin for TaskListResponse
impl UnwindSafe for TaskListResponse
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].