Trait RegionParser

Source
pub trait RegionParser {
    // Required methods
    fn parse(&self) -> Result<RegionRef<'_>>;
    fn position(&self) -> Option<(i32, i32)>;
}
Expand description

A trait which represents something that can be parsed into a region and optionally contains information about which region in the world it is.

Required Methods§

Source

fn parse(&self) -> Result<RegionRef<'_>>

Parse this into a Region and return it through RegionRef so that we can have either owned or or as a reference

Source

fn position(&self) -> Option<(i32, i32)>

Get the position in the world (using region coordinates) of the region that will be parsed by this RegionParser if there is no information as to which region this is, then None should be returned.

Implementors§