Enum sgf_parse::GameTree [−][src]
Expand description
An SGF GameTree value.
This type allows creating a collection of SgfNode
values for different games. This is
used in the return type of the parse
function. Users of the
serialize
function will need to build these.
For now, all non-Go games will parse as GameTree::Unknown
which should also be used for any
serialization of non-Go games.
Variants
Implementations
Consumes a Go game GameTree
and returns the contained SgfNode
.
This is a convenience method for go games.
Errors
Returns an error if the variant isn’t a GameTree::GoGame
.
Examples
use sgf_parse::parse; let gametree = parse("(;B[de]C[A comment])").unwrap().into_iter().next().unwrap(); let sgf_node = gametree.into_go_node().unwrap();
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for GameTree
impl UnwindSafe for GameTree
Blanket Implementations
Mutably borrows from an owned value. Read more