pub struct Cases<'a>(/* private fields */);Implementations§
Source§impl<'a> Cases<'a>
impl<'a> Cases<'a>
Sourcepub fn find(&self) -> FindCases<'a>
pub fn find(&self) -> FindCases<'a>
One page of cases visible to the user, across owners unless filtered.
pub fn get(&self, id: &str) -> GetCase<'a>
Sourcepub fn create<B: Serialize + ?Sized>(&self, case: &B) -> CreateCase<'a>
pub fn create<B: Serialize + ?Sized>(&self, case: &B) -> CreateCase<'a>
Creates a case from a NewCase or equivalent JSON.
Sourcepub fn update(
&self,
patches: impl IntoIterator<Item = CasePatch>,
) -> UpdateCases<'a>
pub fn update( &self, patches: impl IntoIterator<Item = CasePatch>, ) -> UpdateCases<'a>
Applies several versioned patches in one request.
Sourcepub fn delete<I: IntoIterator<Item = S>, S: AsRef<str>>(
&self,
ids: I,
) -> DeleteCases<'a>
pub fn delete<I: IntoIterator<Item = S>, S: AsRef<str>>( &self, ids: I, ) -> DeleteCases<'a>
Deletes cases and their comments.
Sourcepub fn add_comment<B: Serialize + ?Sized>(
&self,
case_id: &str,
comment: &B,
) -> AddComment<'a>
pub fn add_comment<B: Serialize + ?Sized>( &self, case_id: &str, comment: &B, ) -> AddComment<'a>
Adds a CaseComment or other attachment and returns the updated case.
pub fn find_comments(&self, case_id: &str) -> FindComments<'a>
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Cases<'a>
impl<'a> !UnwindSafe for Cases<'a>
impl<'a> Freeze for Cases<'a>
impl<'a> Send for Cases<'a>
impl<'a> Sync for Cases<'a>
impl<'a> Unpin for Cases<'a>
impl<'a> UnsafeUnpin for Cases<'a>
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