pub struct CurrentPrincipal(pub Principal);Expand description
The authenticated principal of the request; 401 for guests.
Tuple Fields§
§0: PrincipalImplementations§
Source§impl CurrentPrincipal
impl CurrentPrincipal
Sourcepub fn from_parts(parts: &Parts) -> Result<Self, AppError>
pub fn from_parts(parts: &Parts) -> Result<Self, AppError>
The principal the pipeline authenticated for the request of parts;
401 for a guest.
Trait Implementations§
Source§impl Clone for CurrentPrincipal
impl Clone for CurrentPrincipal
Source§impl Debug for CurrentPrincipal
impl Debug for CurrentPrincipal
Source§impl FromRequestParts for CurrentPrincipal
impl FromRequestParts for CurrentPrincipal
Auto Trait Implementations§
impl Forget for CurrentPrincipal
impl Freeze for CurrentPrincipal
impl Move for CurrentPrincipal
impl RefUnwindSafe for CurrentPrincipal
impl Send for CurrentPrincipal
impl Sync for CurrentPrincipal
impl Unpin for CurrentPrincipal
impl UnsafeUnpin for CurrentPrincipal
impl UnwindSafe for CurrentPrincipal
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FromRequest<ViaParts> for Twhere
T: FromRequestParts,
impl<T> FromRequest<ViaParts> for Twhere
T: FromRequestParts,
Source§type Rejection = <T as FromRequestParts>::Rejection
type Rejection = <T as FromRequestParts>::Rejection
What a failed extraction answers.
Source§async fn from_request(
request: Request<Body>,
) -> Result<T, <T as FromRequest<ViaParts>>::Rejection>
async fn from_request( request: Request<Body>, ) -> Result<T, <T as FromRequest<ViaParts>>::Rejection>
Reads the extractor from the request.