Struct UserCode
pub struct UserCode(/* private fields */);Expand description
A device-flow user code: the responder issues it, the joiner shows it, and the operator
enters it at the responder to approve. Debug does not show it.
Implementations§
§impl UserCode
impl UserCode
pub fn generate(
alphabet: &CodeAlphabet,
random: &Random,
) -> Result<UserCode, Error>
pub fn generate( alphabet: &CodeAlphabet, random: &Random, ) -> Result<UserCode, Error>
A random user code of alphabet.
§Errors
[Error::InvalidOptions] for a meaningless alphabet, [Error::Random].
Trait Implementations§
impl Eq for UserCode
impl StructuralPartialEq for UserCode
Auto Trait Implementations§
impl Freeze for UserCode
impl RefUnwindSafe for UserCode
impl Send for UserCode
impl Sync for UserCode
impl Unpin for UserCode
impl UnsafeUnpin for UserCode
impl UnwindSafe for UserCode
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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