[][src]Struct onedrive_api::option::ObjectOption

pub struct ObjectOption<Field> { /* fields omitted */ }

Option for GET-like requests to one resource object.

Methods

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

Microsoft Docs

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.

See also

Microsoft Docs

Trait Implementations

impl<Field: ResourceField> Default for ObjectOption<Field>[src]

impl<Field: Debug> Debug for ObjectOption<Field>[src]

Auto Trait Implementations

impl<Field> !Send for ObjectOption<Field>

impl<Field> !Sync for ObjectOption<Field>

impl<Field> !Unpin for ObjectOption<Field>

impl<Field> !UnwindSafe for ObjectOption<Field>

impl<Field> !RefUnwindSafe for ObjectOption<Field>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err