pub struct AuthToken(/* private fields */);Expand description
OAuth bearer access token used in Authorization: Bearer ... headers
and in the streamer LOGIN frame’s Authorization parameter.
§Security
Bearer credential with trading authority on a real-money
account. Wrapped in secrecy::SecretBox: Debug redacts and
Drop zeroises. Obtain the raw value via
expose_secret only at
the point of use (header construction, LOGIN-frame
construction); do not store it in a plain String, do not
include it in error variants or log lines, and do not pass it
to a serializer that prints its input on error. See the
module-level threat model for what these properties do and do
not defend against.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AuthToken
impl<'de> Deserialize<'de> for AuthToken
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
Source§impl From<SecretBox<str>> for AuthToken
impl From<SecretBox<str>> for AuthToken
Source§fn from(value: SecretString) -> Self
fn from(value: SecretString) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for AuthToken
impl RefUnwindSafe for AuthToken
impl Send for AuthToken
impl Sync for AuthToken
impl Unpin for AuthToken
impl UnsafeUnpin for AuthToken
impl UnwindSafe for AuthToken
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