#[repr(u8)]pub enum ProofLocation {
Private = 0,
Emitted = 1,
Swarm = 2,
Waku = 3,
Reserved = 4,
Ipfs = 5,
}Expand description
Where the Merkle proof for a conditional order is stored / communicated.
Variants§
Private = 0
Proof is kept private; only the owner polls.
Emitted = 1
Proof emitted as an on-chain event.
Swarm = 2
Proof stored on Swarm.
Waku = 3
Proof communicated via Waku.
Reserved = 4
Reserved for future use.
Ipfs = 5
Proof stored on IPFS.
Implementations§
Source§impl ProofLocation
impl ProofLocation
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
Returns a lowercase string label for the proof location.
Sourcepub const fn is_private(self) -> bool
pub const fn is_private(self) -> bool
Returns true if the proof is kept private (owner-polled only).
Sourcepub const fn is_emitted(self) -> bool
pub const fn is_emitted(self) -> bool
Returns true if the proof is emitted as an on-chain event.
Sourcepub const fn is_reserved(self) -> bool
pub const fn is_reserved(self) -> bool
Returns true if this location is the reserved (future-use) discriminant.
Trait Implementations§
Source§impl Clone for ProofLocation
impl Clone for ProofLocation
Source§fn clone(&self) -> ProofLocation
fn clone(&self) -> ProofLocation
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 Debug for ProofLocation
impl Debug for ProofLocation
Source§impl Default for ProofLocation
impl Default for ProofLocation
Source§fn default() -> ProofLocation
fn default() -> ProofLocation
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ProofLocation
impl<'de> Deserialize<'de> for ProofLocation
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 Display for ProofLocation
impl Display for ProofLocation
Source§impl From<ProofLocation> for u8
impl From<ProofLocation> for u8
Source§fn from(loc: ProofLocation) -> Self
fn from(loc: ProofLocation) -> Self
Encode a ProofLocation as its on-chain uint8 discriminant.
This is the inverse of TryFrom<u8> for ProofLocation.
Source§impl PartialEq for ProofLocation
impl PartialEq for ProofLocation
Source§impl Serialize for ProofLocation
impl Serialize for ProofLocation
Source§impl TryFrom<&str> for ProofLocation
impl TryFrom<&str> for ProofLocation
Source§impl TryFrom<u8> for ProofLocation
impl TryFrom<u8> for ProofLocation
impl Copy for ProofLocation
impl Eq for ProofLocation
impl StructuralPartialEq for ProofLocation
Auto Trait Implementations§
impl Freeze for ProofLocation
impl RefUnwindSafe for ProofLocation
impl Send for ProofLocation
impl Sync for ProofLocation
impl Unpin for ProofLocation
impl UnsafeUnpin for ProofLocation
impl UnwindSafe for ProofLocation
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.