Struct coset::cwt::ClaimsSetBuilder
source · pub struct ClaimsSetBuilder(/* private fields */);
Expand description
Builder for ClaimsSet
objects.
Implementations§
source§impl ClaimsSetBuilder
impl ClaimsSetBuilder
sourcepub fn expiration_time(self, expiration_time: Timestamp) -> Self
pub fn expiration_time(self, expiration_time: Timestamp) -> Self
Set the associated field.
sourcepub fn not_before(self, not_before: Timestamp) -> Self
pub fn not_before(self, not_before: Timestamp) -> Self
Set the associated field.
sourcepub fn claim(self, name: CwtClaimName, value: Value) -> Self
pub fn claim(self, name: CwtClaimName, value: Value) -> Self
Set a claim name:value pair.
§Panics
This function will panic if it used to set a claim with name from the range [1, 7].
sourcepub fn text_claim(self, name: String, value: Value) -> Self
pub fn text_claim(self, name: String, value: Value) -> Self
Set a claim name:value pair where the name
is text.
sourcepub fn private_claim(self, id: i64, value: Value) -> Self
pub fn private_claim(self, id: i64, value: Value) -> Self
Set a claim where the claim key is a numeric value from the private use range.
§Panics
This function will panic if it is used to set a claim with a key value outside of the private use range.
Trait Implementations§
source§impl Default for ClaimsSetBuilder
impl Default for ClaimsSetBuilder
source§fn default() -> ClaimsSetBuilder
fn default() -> ClaimsSetBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ClaimsSetBuilder
impl RefUnwindSafe for ClaimsSetBuilder
impl Send for ClaimsSetBuilder
impl Sync for ClaimsSetBuilder
impl Unpin for ClaimsSetBuilder
impl UnwindSafe for ClaimsSetBuilder
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