Struct byo_graphql::Count
source · pub struct Count {
pub totalCount: usize,
}
Expand description
a structure matching { totalCount}
, convenient
when you want the number of items in a collections
Fields§
§totalCount: usize
Implementations§
source§impl Count
impl Count
sourcepub fn query(collection_name: &str, filter: &str) -> String
pub fn query(collection_name: &str, filter: &str) -> String
build the query part for the count of something.
Can be used for a whole query or just a property. Example:
use byo_graphql::*;
assert_eq!(
Count::query("repositories", "isFork: false"),
r#"repositories(isFork: false){ totalCount }"#,
);
Trait Implementations§
source§impl<'de> Deserialize<'de> for Count
impl<'de> Deserialize<'de> for Count
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
impl Copy for Count
Auto Trait Implementations§
impl RefUnwindSafe for Count
impl Send for Count
impl Sync for Count
impl Unpin for Count
impl UnwindSafe for Count
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