[−][src]Struct ucare::group::Service
Service is used to make calls to group API.
Implementations
impl<'_> Service<'_>[src]
pub fn info(&self, group_id: &str) -> Result<Info>[src]
Acquires some file specific info
pub fn list(&self, params: ListParams) -> Result<List>[src]
Returns a list of groups
ⓘThis example is not tested
let params = group::ListParams{ limit: Some(10), ordering: Some(group::Ordering::CreatedAtDesc), from: None, }; let list = group_svc.list(params)?; let mut next_page = list.next; let mut groups = list.results.unwrap(); while let Some(next) = next_page { let new_page = group_svc.get_page(&next).unwrap(); next_page = new_page.next; groups.extend(new_page.results.unwrap()); } for group in groups.iter() { println!("group: {}", group); }
pub fn get_page(&self, url: &str) -> Result<List>[src]
Gets next page by its url
pub fn store(&self, group_id: &str) -> Result<Info>[src]
Marks all files in group as stored
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Service<'a>
impl<'a> !Send for Service<'a>
impl<'a> !Sync for Service<'a>
impl<'a> Unpin for Service<'a>
impl<'a> !UnwindSafe for Service<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
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> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
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>,