pub struct ResourceFlow<E, R>where
E: Endpoint<R>,
R: WebRequest,{ /* private fields */ }Expand description
Guards resources by requiring OAuth authorization.
Implementations§
Source§impl<E, R> ResourceFlow<E, R>where
E: Endpoint<R>,
R: WebRequest,
impl<E, R> ResourceFlow<E, R>where
E: Endpoint<R>,
R: WebRequest,
Sourcepub fn prepare(endpoint: E) -> Result<Self, E::Error>
pub fn prepare(endpoint: E) -> Result<Self, E::Error>
Check that the endpoint supports the necessary operations for handling requests.
Binds the endpoint to a particular type of request that it supports, for many implementations this is probably single type anyways.
§Panics
Indirectly execute may panic when this flow is instantiated with an inconsistent
endpoint, for details see the documentation of Endpoint and execute. For
consistent endpoints, the panic is instead caught as an error here.
Auto Trait Implementations§
impl<E, R> Freeze for ResourceFlow<E, R>where
WrappedResource<E, R>: Freeze,
impl<E, R> RefUnwindSafe for ResourceFlow<E, R>where
WrappedResource<E, R>: RefUnwindSafe,
impl<E, R> Send for ResourceFlow<E, R>where
WrappedResource<E, R>: Send,
impl<E, R> Sync for ResourceFlow<E, R>where
WrappedResource<E, R>: Sync,
impl<E, R> Unpin for ResourceFlow<E, R>where
WrappedResource<E, R>: Unpin,
impl<E, R> UnsafeUnpin for ResourceFlow<E, R>where
WrappedResource<E, R>: UnsafeUnpin,
impl<E, R> UnwindSafe for ResourceFlow<E, R>where
WrappedResource<E, R>: UnwindSafe,
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