Enum ezomyte::Label
[−]
[src]
pub enum Label { Empty, Cosmetic(String), ExactPrice(Price), NegotiablePrice(Price), Unknown(String, String), }
Label (note) for an item or stash tab.
Those labels can have special meaning in PoE and indicate e.g. prices applicable to all items in the tab.
Variants
Empty
Empty label.
Cosmetic(String)
Cosmetic name, without any other meaning.
ExactPrice(Price)
Exact price ("~price $N $CURR").
NegotiablePrice(Price)
Negotiable price ("~b/o $N $CURR").
Unknown(String, String)
Unrecognized combination of tilde-prefixed tag and value.
Methods
impl Label
[src]
pub fn is_empty(&self) -> bool
[src]
Return whether the label is empty.
pub fn price(&self) -> Option<&Price>
[src]
Return a possible price in the label.
This doesn't distinguish between the exact price and negotiable/buyout price.
pub fn exact_price(&self) -> Option<&Price>
[src]
Return the exact Price
specified in this Label
, if any.
pub fn negotiable_price(&self) -> Option<&Price>
[src]
Return the negotiable (buyout) Price
specified in this Label
, if any.
pub fn tag(&self) -> Option<&str>
[src]
Return the tilde-prefixed tag (like "b/o") from the original label (without the actual tilde prefix).
pub fn value(&self) -> Option<Cow<str>>
[src]
Return a possible string value (usually the price)
that's associated with the label's tag
.
pub fn note(&self) -> Option<&str>
[src]
Return a possible cosmetic note in this Label
.
Trait Implementations
impl Clone for Label
[src]
fn clone(&self) -> Label
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Label
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl PartialEq for Label
[src]
fn eq(&self, __arg_0: &Label) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Label) -> bool
[src]
This method tests for !=
.
impl Default for Label
[src]
impl Display for Label
[src]
fn fmt(&self, fmt: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<'de> Deserialize<'de> for Label
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more