pub enum NatsAuthorization {
Token {
token: String,
},
UserAndPassword {
username: String,
password: String,
},
}Expand description
This matches NATS’ Authorization struct, which is crate-private. https://github.com/nats-io/nats.rs/blob/2f53feab2eac4c01fb470309a3af2c9920f9224a/async-nats/src/lib.rs#L1249
Variants§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for NatsAuthorization
impl<'de> Deserialize<'de> for NatsAuthorization
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
Auto Trait Implementations§
impl Freeze for NatsAuthorization
impl RefUnwindSafe for NatsAuthorization
impl Send for NatsAuthorization
impl Sync for NatsAuthorization
impl Unpin for NatsAuthorization
impl UnwindSafe for NatsAuthorization
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