pub enum Prop {
Show 69 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(String, Vec<String>),
Invalid(String, Vec<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)
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(String, Vec<String>)
Invalid(String, Vec<String>)
HA(i64)
KM(f64)
TB(HashSet<Point>)
TW(HashSet<Point>)
Trait Implementations§
Source§impl SgfProp for Prop
impl SgfProp for Prop
type Point = Point
type Stone = Point
type Move = Move
Source§fn new(identifier: String, values: Vec<String>) -> Self
fn new(identifier: String, values: Vec<String>) -> Self
Returns a new property parsed from the provided identifier and values Read more
Source§fn identifier(&self) -> String
fn identifier(&self) -> String
Source§fn property_type(&self) -> Option<PropertyType>
fn property_type(&self) -> Option<PropertyType>
Returns the
PropertyType
associated with the property. Read moreSource§fn validate_properties(
properties: &[Self],
is_root: bool,
) -> Result<(), InvalidNodeError>
fn validate_properties( properties: &[Self], is_root: bool, ) -> Result<(), InvalidNodeError>
Validates a set of properties. Read more
impl Eq for Prop
impl StructuralPartialEq for Prop
Auto Trait Implementations§
impl Freeze for Prop
impl RefUnwindSafe for Prop
impl Send for Prop
impl Sync for Prop
impl Unpin for Prop
impl UnwindSafe for Prop
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