Struct headless_lms_server::domain::models_requests::UploadClaim
source · pub struct UploadClaim<'a> {
exercise_service_slug: Cow<'a, str>,
expiration_time: DateTime<Utc>,
}
Fields§
§exercise_service_slug: Cow<'a, str>
§expiration_time: DateTime<Utc>
Implementations§
source§impl<'a> UploadClaim<'a>
impl<'a> UploadClaim<'a>
pub fn exercise_service_slug(&self) -> &str
pub fn expiration_time(&self) -> &DateTime<Utc>
pub fn expiring_in_1_day(exercise_service_slug: Cow<'a, str>) -> Self
pub fn sign(self, key: &JwtKey) -> String
pub fn validate(token: &str, key: &JwtKey) -> Result<Self, ControllerError>
Trait Implementations§
source§impl<'a> Debug for UploadClaim<'a>
impl<'a> Debug for UploadClaim<'a>
source§impl<'de, 'a> Deserialize<'de> for UploadClaim<'a>
impl<'de, 'a> Deserialize<'de> for UploadClaim<'a>
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<'a> FromRequest for UploadClaim<'a>
impl<'a> FromRequest for UploadClaim<'a>
§type Error = ControllerError
type Error = ControllerError
The associated error which can be returned.
§type Future = Ready<Result<UploadClaim<'a>, <UploadClaim<'a> as FromRequest>::Error>>
type Future = Ready<Result<UploadClaim<'a>, <UploadClaim<'a> 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<'a> RefUnwindSafe for UploadClaim<'a>
impl<'a> Send for UploadClaim<'a>
impl<'a> Sync for UploadClaim<'a>
impl<'a> Unpin for UploadClaim<'a>
impl<'a> UnwindSafe for UploadClaim<'a>
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