pub struct GradingUpdateClaim {
submission_id: Uuid,
expiration_time: DateTime<Utc>,
}
Fields§
§submission_id: Uuid
§expiration_time: DateTime<Utc>
Implementations§
source§impl GradingUpdateClaim
impl GradingUpdateClaim
pub fn submission_id(&self) -> Uuid
pub fn expiration_time(&self) -> &DateTime<Utc>
pub fn expiring_in_1_day(submission_id: Uuid) -> Self
pub fn sign(self, key: &JwtKey) -> String
pub fn validate(token: &str, key: &JwtKey) -> Result<Self, ControllerError>
Trait Implementations§
source§impl Debug for GradingUpdateClaim
impl Debug for GradingUpdateClaim
source§impl<'de> Deserialize<'de> for GradingUpdateClaim
impl<'de> Deserialize<'de> for GradingUpdateClaim
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl FromRequest for GradingUpdateClaim
impl FromRequest for GradingUpdateClaim
§type Error = ControllerError
type Error = ControllerError
The associated error which can be returned.
§type Future = Ready<Result<GradingUpdateClaim, <GradingUpdateClaim as FromRequest>::Error>>
type Future = Ready<Result<GradingUpdateClaim, <GradingUpdateClaim as FromRequest>::Error>>
Future that resolves to a
Self
. Read moresource§fn from_request(req: &HttpRequest, _payload: &mut Payload) -> Self::Future
fn from_request(req: &HttpRequest, _payload: &mut Payload) -> Self::Future
Create a
Self
from request parts asynchronously.Auto Trait Implementations§
impl RefUnwindSafe for GradingUpdateClaim
impl Send for GradingUpdateClaim
impl Sync for GradingUpdateClaim
impl Unpin for GradingUpdateClaim
impl UnwindSafe for GradingUpdateClaim
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