Enum sgf_parse::go::Prop[][src]

pub enum Prop {
Show variants B(Move), KO, MN(i64), W(Move), AB(HashSet<Point>), AE(HashSet<Point>), AW(HashSet<Point>), PL(Color), C(Text), DM(Double), GB(Double), GW(Double), HO(Double), N(SimpleText), UC(Double), V(f64), BM(Double), DO, IT, TE(Double), AR(HashSet<(Point, Point)>), CR(HashSet<Point>), DD(HashSet<Point>), LB(HashSet<(Point, SimpleText)>), LN(HashSet<(Point, Point)>), MA(HashSet<Point>), SL(HashSet<Point>), SQ(HashSet<Point>), TR(HashSet<Point>), AP((SimpleText, SimpleText)), CA(SimpleText), FF(i64), GM(i64), ST(i64), SZ((u8, u8)), AN(SimpleText), BR(SimpleText), BT(SimpleText), CP(SimpleText), DT(SimpleText), EV(SimpleText), GN(SimpleText), GC(Text), ON(SimpleText), OT(SimpleText), PB(SimpleText), PC(SimpleText), PW(SimpleText), RE(SimpleText), RO(SimpleText), RU(SimpleText), SO(SimpleText), TM(f64), US(SimpleText), WR(SimpleText), WT(SimpleText), BL(f64), OB(i64), OW(i64), WL(f64), FG(Option<(i64, SimpleText)>), PM(i64), VW(HashSet<Point>), Unknown(StringVec<String>), Invalid(StringVec<String>), HA(i64), KM(f64), TB(HashSet<Point>), TW(HashSet<Point>),
}
Expand description

An SGF Property with identifier and value.

All general properties from the SGF specification and all game specific properties will return the approprite enum instance with parsed data. Unrecognized properties will return Prop::Unknown. Recognized general or game specific properties with invalid values will return Prop::Invalid.

See property value types for a list of types recognized by SGF. For parsing purposes the following mappings are used:

Variants

B(Move)
KO
MN(i64)
W(Move)
PL(Color)
C(Text)
DM(Double)
GB(Double)
GW(Double)
HO(Double)
UC(Double)
V(f64)
BM(Double)
DO
IT
TE(Double)
FF(i64)
GM(i64)
ST(i64)
SZ((u8, u8))
GC(Text)
TM(f64)
BL(f64)
OB(i64)
OW(i64)
WL(f64)
PM(i64)
Unknown(StringVec<String>)
Invalid(StringVec<String>)
HA(i64)
KM(f64)

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Returns a new property parsed from the provided identifier and values Read more

Returns a the identifier associated with the SgfProp. Read more

Returns the PropertyType associated with the property. Read more

Validates a set of properties. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.