[−][src]Struct df_st_api::api_objects::ApiCountPage
A paged response from the API.
The actual requested data can be found in the data
object.
Fields
max_page_size: u32
The maximum amount if items in this response.
total_item_count: u32
The total amount of items. (across all pages) Note: id's usually start at 0 so if there are 10 total items the list id is 9. But id's can be missing so do not use this to calculate id's!
page_start: u32
The offset from the start of the database structure. This value takes the sorting of the page into account.
page_size: u32
The actual size of the response. (page_size<=max_page_size).
page_nr: u32
The number of the page.
This value is page_nr = page_start/max_page_size
group_by: Option<String>
Name of the field it is grouped by.
etag: String
Tag to identify this version of the page. More info here. This tag can be used to improve caching. ETag is a Sha256 of the whole response (including links and other metadata, excluding the etag itself.).
links: ApiPageLinks
Links the various related items.
data: Vec<ApiMinimalItem<C>>
List of actual requested data.
given_etag: String
The etag given in the request.
base_url: String
Server base url. Not included in response.
server_max_page_size: u32
Maximum amount of items requested on a page. Set by server at startup, see config. Not included in response.
Implementations
impl<C, D> ApiCountPage<C, D> where
C: ApiObject + Default + Serialize + SchemaExample,
D: ApiObject + Default + Serialize + SchemaExample,
[src]
C: ApiObject + Default + Serialize + SchemaExample,
D: ApiObject + Default + Serialize + SchemaExample,
pub fn new(
pagination: &ApiMinimalPagination,
server_info: &State<'_, ServerInfo>
) -> Self
[src]
pagination: &ApiMinimalPagination,
server_info: &State<'_, ServerInfo>
) -> Self
pub fn wrap(&mut self, list: Vec<C>) -> bool
[src]
Store the data in the object and construct links and calculate ETag. Return if true etag match with request tag.
Trait Implementations
impl<C: Clone, D: Clone> Clone for ApiCountPage<C, D> where
C: ApiObject + Serialize + SchemaExample,
D: ApiObject + Serialize + SchemaExample,
[src]
C: ApiObject + Serialize + SchemaExample,
D: ApiObject + Serialize + SchemaExample,
fn clone(&self) -> ApiCountPage<C, D>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<C: Debug, D: Debug> Debug for ApiCountPage<C, D> where
C: ApiObject + Serialize + SchemaExample,
D: ApiObject + Serialize + SchemaExample,
[src]
C: ApiObject + Serialize + SchemaExample,
D: ApiObject + Serialize + SchemaExample,
impl<C: Default, D: Default> Default for ApiCountPage<C, D> where
C: ApiObject + Serialize + SchemaExample,
D: ApiObject + Serialize + SchemaExample,
[src]
C: ApiObject + Serialize + SchemaExample,
D: ApiObject + Serialize + SchemaExample,
fn default() -> ApiCountPage<C, D>
[src]
impl<'de, C, D> Deserialize<'de> for ApiCountPage<C, D> where
C: ApiObject + Serialize + SchemaExample,
D: ApiObject + Serialize + SchemaExample,
C: Deserialize<'de>,
D: Default,
[src]
C: ApiObject + Serialize + SchemaExample,
D: ApiObject + Serialize + SchemaExample,
C: Deserialize<'de>,
D: Default,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<C: JsonSchema, D: JsonSchema> JsonSchema for ApiCountPage<C, D> where
C: ApiObject + Serialize + SchemaExample,
D: ApiObject + Serialize + SchemaExample,
[src]
C: ApiObject + Serialize + SchemaExample,
D: ApiObject + Serialize + SchemaExample,
fn schema_name() -> String
[src]
fn json_schema(gen: &mut SchemaGenerator) -> Schema
[src]
fn is_referenceable() -> bool
impl<C, D> SchemaExample for ApiCountPage<C, D> where
C: SchemaExample + Serialize + ApiObject,
D: SchemaExample + Serialize + ApiObject,
[src]
C: SchemaExample + Serialize + ApiObject,
D: SchemaExample + Serialize + ApiObject,
impl<C, D> Serialize for ApiCountPage<C, D> where
C: ApiObject + Serialize + SchemaExample,
D: ApiObject + Serialize + SchemaExample,
C: Serialize,
[src]
C: ApiObject + Serialize + SchemaExample,
D: ApiObject + Serialize + SchemaExample,
C: Serialize,
Auto Trait Implementations
impl<C, D> RefUnwindSafe for ApiCountPage<C, D> where
C: RefUnwindSafe,
D: RefUnwindSafe,
C: RefUnwindSafe,
D: RefUnwindSafe,
impl<C, D> Send for ApiCountPage<C, D> where
C: Send,
D: Send,
C: Send,
D: Send,
impl<C, D> Sync for ApiCountPage<C, D> where
C: Sync,
D: Sync,
C: Sync,
D: Sync,
impl<C, D> Unpin for ApiCountPage<C, D> where
C: Unpin,
D: Unpin,
C: Unpin,
D: Unpin,
impl<C, D> UnwindSafe for ApiCountPage<C, D> where
C: UnwindSafe,
D: UnwindSafe,
C: UnwindSafe,
D: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T, I> AsResult<T, I> for T where
I: Input,
I: Input,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> DynClone for T where
T: Clone,
[src]
T: Clone,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoCollection<T> for T
fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
A: Array<Item = T>,
fn mapped<U, F, A>(self, f: F) -> SmallVec<A> where
A: Array<Item = U>,
F: FnMut(T) -> U,
A: Array<Item = U>,
F: FnMut(T) -> U,
impl<T> IntoSql for T
fn into_sql<T>(self) -> Self::Expression where
Self: AsExpression<T>,
Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
&'a Self: AsExpression<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Typeable for T where
T: Any,
T: Any,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,