pub struct Spaces<'a>(/* private fields */);Implementations§
Source§impl<'a> Spaces<'a>
impl<'a> Spaces<'a>
pub fn list(&self) -> ListSpaces<'a>
pub fn get(&self, id: &str) -> GetSpace<'a>
Sourcepub fn create<B: Serialize + ?Sized>(&self, space: &B) -> CreateSpace<'a>
pub fn create<B: Serialize + ?Sized>(&self, space: &B) -> CreateSpace<'a>
Creates a space from a Space or any JSON object with id and name.
Sourcepub fn update<B: Serialize + ?Sized>(
&self,
id: &str,
space: &B,
) -> UpdateSpace<'a>
pub fn update<B: Serialize + ?Sized>( &self, id: &str, space: &B, ) -> UpdateSpace<'a>
Replaces the space’s definition. The JSON object body must contain a
string id matching the path argument. Missing, non-string or conflicting
IDs fail with crate::Error::InvalidRequest before HTTP.
Sourcepub fn delete(&self, id: &str) -> DeleteSpace<'a>
pub fn delete(&self, id: &str) -> DeleteSpace<'a>
Deletes the space and every saved object inside it.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Spaces<'a>
impl<'a> !UnwindSafe for Spaces<'a>
impl<'a> Freeze for Spaces<'a>
impl<'a> Send for Spaces<'a>
impl<'a> Sync for Spaces<'a>
impl<'a> Unpin for Spaces<'a>
impl<'a> UnsafeUnpin for Spaces<'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