pub struct State(/* private fields */);Expand description
OAuth state parameter — random, opaque, single-use.
Generated fresh in [super::RelyingParty::start]; round-tripped
through PAS as a query parameter; matched at callback against the
stored PendingAuthRequest via atomic StateStore::take.
Implementations§
Source§impl State
impl State
Sourcepub fn from_string(s: String) -> Self
pub fn from_string(s: String) -> Self
SDK constructor — used by [super::RelyingParty::start] for
random generation, and by callback handlers for parsing the
inbound query-string state. The value is treated as opaque
bytes; no character-set validation here (substrate adapters
must accept whatever the SDK generates).
pub fn as_str(&self) -> &str
Trait Implementations§
Source§impl<'de> Deserialize<'de> for State
impl<'de> Deserialize<'de> for State
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
impl Eq for State
impl StructuralPartialEq for State
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnsafeUnpin for State
impl UnwindSafe for State
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