[−][src]Struct onedrive_api::option::ObjectOption
Option for GET-like requests to one resource object.
Implementations
impl<Field: ResourceField> ObjectOption<Field>
[src]
pub fn new() -> Self
[src]
Create an empty (default) option.
pub fn if_match(mut self: 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(mut self: 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(mut self: 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: ResourceField> Default for ObjectOption<Field>
[src]
Auto Trait Implementations
impl<Field> !RefUnwindSafe for ObjectOption<Field>
[src]
impl<Field> Send for ObjectOption<Field>
[src]
impl<Field> Sync for ObjectOption<Field>
[src]
impl<Field> !Unpin for ObjectOption<Field>
[src]
impl<Field> !UnwindSafe for ObjectOption<Field>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,