Struct onedrive_api::option::ObjectOption [−][src]
pub struct ObjectOption<Field> { /* fields omitted */ }Option for GET-like requests to one resource object.
Implementations
impl<Field: ResourceField> ObjectOption<Field>[src]
impl<Field: ResourceField> ObjectOption<Field>[src]pub fn new() -> Self[src]
Create an empty (default) option.
pub fn if_match(self, tag: &Tag) -> Self[src]
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.
pub fn if_none_match(self, tag: &Tag) -> Self[src]
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.
pub fn select(self, fields: &[Field]) -> Self[src]
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
pub fn expand(self, field: Field, select_children: Option<&[&str]>) -> Self[src]
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
impl<Field: Debug> Debug for ObjectOption<Field>[src]
impl<Field: Debug> Debug for ObjectOption<Field>[src]impl<Field: ResourceField> Default for ObjectOption<Field>[src]
impl<Field: ResourceField> Default for ObjectOption<Field>[src]Auto Trait Implementations
impl<Field> !RefUnwindSafe for ObjectOption<Field>
impl<Field> !RefUnwindSafe for ObjectOption<Field>impl<Field> Send for ObjectOption<Field>
impl<Field> Send for ObjectOption<Field>impl<Field> Sync for ObjectOption<Field>
impl<Field> Sync for ObjectOption<Field>impl<Field> !Unpin for ObjectOption<Field>
impl<Field> !Unpin for ObjectOption<Field>impl<Field> !UnwindSafe for ObjectOption<Field>
impl<Field> !UnwindSafe for ObjectOption<Field>Blanket Implementations
impl<T> Instrument for T[src]
impl<T> Instrument for T[src]