pub enum Nonce {
Nonce96(GenericArray<u8, U12>, IncomingTyp),
Nonce128(GenericArray<u8, U16>, IncomingTyp),
Empty,
}Expand description
Enumeration over allowed nonce types.
Variants§
Nonce96(GenericArray<u8, U12>, IncomingTyp)
96-bit, 12-byte nonce, e.g. xid.
Nonce128(GenericArray<u8, U16>, IncomingTyp)
128-bit, 16-byte nonce.
Empty
No Nonce attributed.
Implementations§
Source§impl Nonce
impl Nonce
Sourcepub fn is_nonce96(&self) -> bool
pub fn is_nonce96(&self) -> bool
Returns true if this is a Nonce::Nonce96, otherwise false
Sourcepub fn as_nonce96_mut(
&mut self,
) -> Option<(&mut GenericArray<u8, U12>, &mut IncomingTyp)>
pub fn as_nonce96_mut( &mut self, ) -> Option<(&mut GenericArray<u8, U12>, &mut IncomingTyp)>
Optionally returns mutable references to the inner fields if this is a Nonce::Nonce96, otherwise None
Sourcepub fn as_nonce96(&self) -> Option<(&GenericArray<u8, U12>, &IncomingTyp)>
pub fn as_nonce96(&self) -> Option<(&GenericArray<u8, U12>, &IncomingTyp)>
Optionally returns references to the inner fields if this is a Nonce::Nonce96, otherwise None
Sourcepub fn into_nonce96(self) -> Result<(GenericArray<u8, U12>, IncomingTyp), Self>
pub fn into_nonce96(self) -> Result<(GenericArray<u8, U12>, IncomingTyp), Self>
Returns the inner fields if this is a Nonce::Nonce96, otherwise returns back the enum in the Err case of the result
Sourcepub fn is_nonce128(&self) -> bool
pub fn is_nonce128(&self) -> bool
Returns true if this is a Nonce::Nonce128, otherwise false
Sourcepub fn as_nonce128_mut(
&mut self,
) -> Option<(&mut GenericArray<u8, U16>, &mut IncomingTyp)>
pub fn as_nonce128_mut( &mut self, ) -> Option<(&mut GenericArray<u8, U16>, &mut IncomingTyp)>
Optionally returns mutable references to the inner fields if this is a Nonce::Nonce128, otherwise None
Sourcepub fn as_nonce128(&self) -> Option<(&GenericArray<u8, U16>, &IncomingTyp)>
pub fn as_nonce128(&self) -> Option<(&GenericArray<u8, U16>, &IncomingTyp)>
Optionally returns references to the inner fields if this is a Nonce::Nonce128, otherwise None
Sourcepub fn into_nonce128(self) -> Result<(GenericArray<u8, U16>, IncomingTyp), Self>
pub fn into_nonce128(self) -> Result<(GenericArray<u8, U16>, IncomingTyp), Self>
Returns the inner fields if this is a Nonce::Nonce128, otherwise returns back the enum in the Err case of the result
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Nonce
impl<'de> Deserialize<'de> for Nonce
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>,
Source§impl JsonSchema for Nonce
impl JsonSchema for Nonce
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreimpl StructuralPartialEq for Nonce
Auto Trait Implementations§
impl Freeze for Nonce
impl RefUnwindSafe for Nonce
impl Send for Nonce
impl Sync for Nonce
impl Unpin for Nonce
impl UnwindSafe for Nonce
Blanket Implementations§
Source§impl<T> AggregateExpressionMethods for T
impl<T> AggregateExpressionMethods for T
Source§fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
DISTINCT modifier for aggregate functions Read moreSource§fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
ALL modifier for aggregate functions Read moreSource§fn aggregate_filter<P>(self, f: P) -> Self::Output
fn aggregate_filter<P>(self, f: P) -> Self::Output
Source§fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
Source§impl<T> Base64Encode for Twhere
T: DagJson,
impl<T> Base64Encode for Twhere
T: DagJson,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DagJson for Twhere
T: Serialize + DeserializeOwned,
impl<T> DagJson for Twhere
T: Serialize + DeserializeOwned,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
self to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
&self to an expression for Diesel’s query builder. Read more