pub struct Progeny {
pub total_count: i64,
pub animals: Vec<ProgenyAnimal>,
pub page: u32,
pub page_size: u32,
}Expand description
Paginated progeny result.
Fields§
§total_count: i64Total number of offspring.
animals: Vec<ProgenyAnimal>Offspring on this page.
page: u32Current page number (0-indexed).
page_size: u32Page size.
Implementations§
Source§impl Progeny
impl Progeny
Sourcepub fn from_api_response(
data: &Value,
page: u32,
page_size: u32,
) -> Result<Self>
pub fn from_api_response( data: &Value, page: u32, page_size: u32, ) -> Result<Self>
Parse a Progeny from the raw JSON value returned by the API.
The progeny endpoint uses records / recordCount (lowercase) rather
than the Results / TotalCount convention used elsewhere.
§Errors
Returns crate::Error::Parse if the response cannot be interpreted.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Progeny
impl<'de> Deserialize<'de> for Progeny
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 Progeny
impl RefUnwindSafe for Progeny
impl Send for Progeny
impl Sync for Progeny
impl Unpin for Progeny
impl UnsafeUnpin for Progeny
impl UnwindSafe for Progeny
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