pub struct Parser { /* private fields */ }Expand description
解析器实例
Implementations§
Source§impl Parser
impl Parser
Sourcepub fn with_config(config: ParserConfig) -> Self
pub fn with_config(config: ParserConfig) -> Self
使用自定义配置创建解析器
Sourcepub fn parse(&self, text: &str) -> Result<CountryInfo, ParseError>
pub fn parse(&self, text: &str) -> Result<CountryInfo, ParseError>
解析文本中的国家代码
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Parser
impl RefUnwindSafe for Parser
impl Send for Parser
impl Sync for Parser
impl Unpin for Parser
impl UnwindSafe for Parser
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