pub struct PrfInput<'first, 'second> {
pub first: &'first [u8],
pub second: Option<&'second [u8]>,
}Expand description
Fields§
§first: &'first [u8]§second: Option<&'second [u8]>Implementations§
Source§impl<'first, 'second> PrfInput<'first, 'second>
impl<'first, 'second> PrfInput<'first, 'second>
Sourcepub const fn with_first<'a: 'first>(first: &'a [u8]) -> Self
pub const fn with_first<'a: 'first>(first: &'a [u8]) -> Self
Returns a PrfInput with Self::first set to first and Self::second set to None.
Sourcepub const fn with_two<'a: 'first, 'b: 'second>(
first: &'a [u8],
second: &'b [u8],
) -> Self
pub const fn with_two<'a: 'first, 'b: 'second>( first: &'a [u8], second: &'b [u8], ) -> Self
Same as Self::with_first except Self::second is set to Some containing second.
Trait Implementations§
impl<'first, 'second> Copy for PrfInput<'first, 'second>
impl<'first, 'second> Eq for PrfInput<'first, 'second>
Source§impl Serialize for PrfInput<'_, '_>
Available on crate feature serde only.
impl Serialize for PrfInput<'_, '_>
Available on crate feature
serde only.Source§fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>where
S: Serializer,
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>where
S: Serializer,
Serializes self to conform with
AuthenticationExtensionsPRFValues.
§Examples
assert_eq!(
serde_json::to_string(&PrfInput {
first: [0; 4].as_slice(),
second: Some([2; 1].as_slice()),
})?,
r#"{"first":"AAAAAA","second":"Ag"}"#
);impl<'first, 'second> StructuralPartialEq for PrfInput<'first, 'second>
Auto Trait Implementations§
impl<'first, 'second> Freeze for PrfInput<'first, 'second>
impl<'first, 'second> RefUnwindSafe for PrfInput<'first, 'second>
impl<'first, 'second> Send for PrfInput<'first, 'second>
impl<'first, 'second> Sync for PrfInput<'first, 'second>
impl<'first, 'second> Unpin for PrfInput<'first, 'second>
impl<'first, 'second> UnsafeUnpin for PrfInput<'first, 'second>
impl<'first, 'second> UnwindSafe for PrfInput<'first, 'second>
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