pub struct Attribute {
pub name: &'static str,
pub len_bytes: Wire,
pub value: Vec<Wire>,
}Expand description
Represents a single JWT attribute to verify
Fields§
§name: &'static str§len_bytes: WireThe actual length of the expected value in bytes.
value: Vec<Wire>Implementations§
Source§impl Attribute
impl Attribute
Sourcepub fn populate_len_bytes(&self, w: &mut WitnessFiller<'_>, len_bytes: usize)
pub fn populate_len_bytes(&self, w: &mut WitnessFiller<'_>, len_bytes: usize)
Populate the actual value length
Sourcepub fn populate_value(&self, w: &mut WitnessFiller<'_>, value: &[u8])
pub fn populate_value(&self, w: &mut WitnessFiller<'_>, value: &[u8])
Populate the expected value from bytes
§Panics
Panics if value.len() > max_value_size (determined by self.value.len() * 8)
Auto Trait Implementations§
impl Freeze for Attribute
impl RefUnwindSafe for Attribute
impl Send for Attribute
impl Sync for Attribute
impl Unpin for Attribute
impl UnsafeUnpin for Attribute
impl UnwindSafe for Attribute
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more