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> + Send + Sync,
R: WebRequest + Send + Sync,
<R as WebRequest>::Error: Send + Sync,
impl<E, R> ResourceFlow<E, R>where
E: Endpoint<R> + Send + Sync,
R: WebRequest + Send + Sync,
<R as WebRequest>::Error: Send + Sync,
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
E: Freeze,
impl<E, R> RefUnwindSafe for ResourceFlow<E, R>where
E: RefUnwindSafe,
R: RefUnwindSafe,
impl<E, R> Send for ResourceFlow<E, R>
impl<E, R> Sync for ResourceFlow<E, R>
impl<E, R> Unpin for ResourceFlow<E, R>
impl<E, R> UnwindSafe for ResourceFlow<E, R>where
E: UnwindSafe,
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