pub enum PlaintextType<N: Network> {
Literal(LiteralType),
Struct(Identifier<N>),
}
Expand description
A ValueType
defines the type parameter for an entry in an Struct
.
Variants§
Literal(LiteralType)
A literal type contains its type name.
The format of the type is <type_name>
.
Struct(Identifier<N>)
An struct type contains its identifier.
The format of the type is <identifier>
.
Trait Implementations§
source§impl<N: Clone + Network> Clone for PlaintextType<N>
impl<N: Clone + Network> Clone for PlaintextType<N>
source§fn clone(&self) -> PlaintextType<N>
fn clone(&self) -> PlaintextType<N>
Returns a copy 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<N: Network> Debug for PlaintextType<N>
impl<N: Network> Debug for PlaintextType<N>
source§impl<'de, N: Network> Deserialize<'de> for PlaintextType<N>
impl<'de, N: Network> Deserialize<'de> for PlaintextType<N>
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserializes the plaintext type from a string or bytes.
source§impl<N: Network> Display for PlaintextType<N>
impl<N: Network> Display for PlaintextType<N>
source§impl<N: Network> From<Identifier<N>> for PlaintextType<N>
impl<N: Network> From<Identifier<N>> for PlaintextType<N>
source§fn from(struct_: Identifier<N>) -> Self
fn from(struct_: Identifier<N>) -> Self
Initializes a plaintext type from a struct type.
source§impl<N: Network> From<LiteralType> for PlaintextType<N>
impl<N: Network> From<LiteralType> for PlaintextType<N>
source§fn from(literal: LiteralType) -> Self
fn from(literal: LiteralType) -> Self
Initializes a plaintext type from a literal type.
source§impl<N: Network> FromBytes for PlaintextType<N>
impl<N: Network> FromBytes for PlaintextType<N>
source§impl<N: Network> FromStr for PlaintextType<N>
impl<N: Network> FromStr for PlaintextType<N>
source§impl<N: Network> Parser for PlaintextType<N>
impl<N: Network> Parser for PlaintextType<N>
source§fn parse(string: &str) -> ParserResult<'_, Self>
fn parse(string: &str) -> ParserResult<'_, Self>
Parses a string into a plaintext type.
source§impl<N: PartialEq + Network> PartialEq<PlaintextType<N>> for PlaintextType<N>
impl<N: PartialEq + Network> PartialEq<PlaintextType<N>> for PlaintextType<N>
source§fn eq(&self, other: &PlaintextType<N>) -> bool
fn eq(&self, other: &PlaintextType<N>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<N: Network> Serialize for PlaintextType<N>
impl<N: Network> Serialize for PlaintextType<N>
source§impl<N: Network> ToBytes for PlaintextType<N>
impl<N: Network> ToBytes for PlaintextType<N>
impl<N: Copy + Network> Copy for PlaintextType<N>
impl<N: Eq + Network> Eq for PlaintextType<N>
impl<N: Network> StructuralEq for PlaintextType<N>
impl<N: Network> StructuralPartialEq for PlaintextType<N>
Auto Trait Implementations§
impl<N> RefUnwindSafe for PlaintextType<N>where <N as Environment>::Field: RefUnwindSafe,
impl<N> Send for PlaintextType<N>
impl<N> Sync for PlaintextType<N>
impl<N> Unpin for PlaintextType<N>where <N as Environment>::Field: Unpin,
impl<N> UnwindSafe for PlaintextType<N>where <N as Environment>::Field: 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<'de, T> DeserializeExt<'de> for Twhere
T: DeserializeOwned,
impl<'de, T> DeserializeExt<'de> for Twhere T: DeserializeOwned,
fn take_from_value<D>( value: &mut Value, field: &str ) -> Result<T, <D as Deserializer<'de>>::Error>where D: Deserializer<'de>,
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§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 Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.