pub struct PredictionMarketKey {
pub venue: PredictionVenue,
pub market_id: PredictionMarketId,
}Expand description
Venue-namespaced key for a prediction market of any shape.
Fields§
§venue: PredictionVenuePrediction venue that issued the market identifier.
market_id: PredictionMarketIdProvider-native market/claim identifier.
Implementations§
Source§impl PredictionMarketKey
impl PredictionMarketKey
Sourcepub const fn from_parts(
venue: PredictionVenue,
market_id: PredictionMarketId,
) -> PredictionMarketKey
pub const fn from_parts( venue: PredictionVenue, market_id: PredictionMarketId, ) -> PredictionMarketKey
Construct a key from already-validated venue and market id values.
Sourcepub fn new(
venue: &str,
market_id: &str,
) -> Result<PredictionMarketKey, PredictionError>
pub fn new( venue: &str, market_id: &str, ) -> Result<PredictionMarketKey, PredictionError>
Construct a key from string inputs.
§Errors
Returns PredictionError if either input fails validation.
Sourcepub fn unique_key(&self) -> String
pub fn unique_key(&self) -> String
Returns a collision-resistant, venue-namespaced identity key.
Trait Implementations§
Source§impl Clone for PredictionMarketKey
impl Clone for PredictionMarketKey
Source§fn clone(&self) -> PredictionMarketKey
fn clone(&self) -> PredictionMarketKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Columnar for PredictionMarketKey
impl Columnar for PredictionMarketKey
Source§fn columnar_to_dataframe(
items: &[PredictionMarketKey],
) -> Result<DataFrame, PolarsError>
fn columnar_to_dataframe( items: &[PredictionMarketKey], ) -> Result<DataFrame, PolarsError>
Errors Read more
Source§fn columnar_from_refs(
items: &[&PredictionMarketKey],
) -> Result<DataFrame, PolarsError>
fn columnar_from_refs( items: &[&PredictionMarketKey], ) -> Result<DataFrame, PolarsError>
Errors Read more
Source§impl Debug for PredictionMarketKey
impl Debug for PredictionMarketKey
Source§impl<'de> Deserialize<'de> for PredictionMarketKey
impl<'de> Deserialize<'de> for PredictionMarketKey
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PredictionMarketKey, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PredictionMarketKey, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for PredictionMarketKey
impl Display for PredictionMarketKey
impl Eq for PredictionMarketKey
Source§impl Hash for PredictionMarketKey
impl Hash for PredictionMarketKey
Source§impl PartialEq for PredictionMarketKey
impl PartialEq for PredictionMarketKey
Source§impl Serialize for PredictionMarketKey
impl Serialize for PredictionMarketKey
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for PredictionMarketKey
Source§impl ToDataFrame for PredictionMarketKey
impl ToDataFrame for PredictionMarketKey
Source§fn to_dataframe(&self) -> Result<DataFrame, PolarsError>
fn to_dataframe(&self) -> Result<DataFrame, PolarsError>
Errors Read more
Source§fn empty_dataframe() -> Result<DataFrame, PolarsError>
fn empty_dataframe() -> Result<DataFrame, PolarsError>
Errors Read more
Auto Trait Implementations§
impl Freeze for PredictionMarketKey
impl RefUnwindSafe for PredictionMarketKey
impl Send for PredictionMarketKey
impl Sync for PredictionMarketKey
impl Unpin for PredictionMarketKey
impl UnsafeUnpin for PredictionMarketKey
impl UnwindSafe for PredictionMarketKey
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.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> Key for Twhere
T: Clone,
impl<T> Key for Twhere
T: Clone,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more