pub struct LicenseKey<T = String>(pub(crate) T);Expand description
A newtype wrapping String or &str for the license key.
-
The default value is set to
TEST_ALL_LICENSE_KEY_CONTENTin debug mode, to allow all features in tests.PROD_ALL_4_CORE_LICENSE_KEY_CONTENTin release mode, to allow evaluation of all features on a small scale.
-
The content will be redacted when printed or serialized.
Tuple Fields§
§0: TImplementations§
Source§impl<T: AsRef<str>> LicenseKey<T>
impl<T: AsRef<str>> LicenseKey<T>
fn redact_str(&self) -> &str
Source§impl LicenseKey
impl LicenseKey
Sourcepub fn as_ref(&self) -> LicenseKeyRef<'_>
pub fn as_ref(&self) -> LicenseKeyRef<'_>
Convert to a reference.
Trait Implementations§
Source§impl<T: Clone> Clone for LicenseKey<T>
impl<T: Clone> Clone for LicenseKey<T>
Source§fn clone(&self) -> LicenseKey<T>
fn clone(&self) -> LicenseKey<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'de, T> Deserialize<'de> for LicenseKey<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for LicenseKey<T>where
T: Deserialize<'de>,
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<'a> From<LicenseKey<&'a str>> for LicenseKey
impl<'a> From<LicenseKey<&'a str>> for LicenseKey
Source§fn from(t: LicenseKeyRef<'a>) -> Self
fn from(t: LicenseKeyRef<'a>) -> Self
Converts to this type from the input type.
Source§impl<T: AsRef<str>> From<LicenseKey<T>> for String
impl<T: AsRef<str>> From<LicenseKey<T>> for String
Source§fn from(val: LicenseKey<T>) -> Self
fn from(val: LicenseKey<T>) -> Self
Converts to this type from the input type.
Source§impl<T> From<T> for LicenseKey<T>
impl<T> From<T> for LicenseKey<T>
Source§impl FromStr for LicenseKey
impl FromStr for LicenseKey
Source§impl<A, B> PartialEq<LicenseKey<B>> for LicenseKey<A>
impl<A, B> PartialEq<LicenseKey<B>> for LicenseKey<A>
impl<T: Copy> Copy for LicenseKey<T>
impl<T: AsRef<str>> Eq for LicenseKey<T>
Auto Trait Implementations§
impl<T> Freeze for LicenseKey<T>where
T: Freeze,
impl<T> RefUnwindSafe for LicenseKey<T>where
T: RefUnwindSafe,
impl<T> Send for LicenseKey<T>where
T: Send,
impl<T> Sync for LicenseKey<T>where
T: Sync,
impl<T> Unpin for LicenseKey<T>where
T: Unpin,
impl<T> UnwindSafe for LicenseKey<T>where
T: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Forward to the method defined on the type
Any.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Forward to the method defined on the type
Any.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoLikeExpr for T
impl<T> IntoLikeExpr for T
fn into_like_expr(self) -> LikeExpr
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.