pub struct ObjectOption<Field> { /* private fields */ }
Expand description
Option for GET-like requests to one resource object.
Implementations§
Source§impl<Field: ResourceField> ObjectOption<Field>
impl<Field: ResourceField> ObjectOption<Field>
Sourcepub fn if_match(self, tag: &Tag) -> Self
pub fn if_match(self, tag: &Tag) -> Self
Only response if the object matches the tag
.
Will cause HTTP 412 Precondition Failed otherwise.
It is usually used for PUT-like requests to assert preconditions, but most of GET-like requests also support it.
It will add If-Match
to the request header.
Sourcepub fn if_none_match(self, tag: &Tag) -> Self
pub fn if_none_match(self, tag: &Tag) -> Self
Only response if the object does not match the tag
.
Will cause the relative API returns None
otherwise.
It is usually used for GET-like requests to reduce data transmission if cached data can be reused.
This will add If-None-Match
to the request header.
Sourcepub fn select(self, fields: &[Field]) -> Self
pub fn select(self, fields: &[Field]) -> Self
Select only some fields of the resource object.
See documentation of module onedrive_api::resource
for more details.
§Note
If called more than once, all fields mentioned will be selected.
§See also
Sourcepub fn expand(self, field: Field, select_children: Option<&[&str]>) -> Self
pub fn expand(self, field: Field, select_children: Option<&[&str]>) -> Self
Expand a field of the resource object.
See documentation of module onedrive_api::resource
for more details.
§Note
If called more than once, all fields mentioned will be expanded.
select_children
should be raw camelCase field names mentioned in Microsoft Docs below.
§See also
Trait Implementations§
Source§impl<Field: Clone> Clone for ObjectOption<Field>
impl<Field: Clone> Clone for ObjectOption<Field>
Source§fn clone(&self) -> ObjectOption<Field>
fn clone(&self) -> ObjectOption<Field>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<Field: Debug> Debug for ObjectOption<Field>
impl<Field: Debug> Debug for ObjectOption<Field>
Source§impl<Field: ResourceField> Default for ObjectOption<Field>
impl<Field: ResourceField> Default for ObjectOption<Field>
Source§impl<Field: PartialEq> PartialEq for ObjectOption<Field>
impl<Field: PartialEq> PartialEq for ObjectOption<Field>
impl<Field: Eq> Eq for ObjectOption<Field>
impl<Field> StructuralPartialEq for ObjectOption<Field>
Auto Trait Implementations§
impl<Field> Freeze for ObjectOption<Field>
impl<Field> !RefUnwindSafe for ObjectOption<Field>
impl<Field> Send for ObjectOption<Field>
impl<Field> Sync for ObjectOption<Field>
impl<Field> !Unpin for ObjectOption<Field>
impl<Field> !UnwindSafe for ObjectOption<Field>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.