pub trait CMakeParse<'t>: 't + Sized {
Show 14 methods
// Required method
fn parse<'tv>(
tokens: &'tv [Token<'t>],
) -> Result<(Self, &'tv [Token<'t>]), CommandParseError>;
// Provided methods
fn complete(tokens: &[Token<'t>]) -> Result<Self, CommandParseError> { ... }
fn default_value() -> Option<Self> { ... }
fn matches(
&self,
field_keyword: &[u8],
keyword: &[u8],
tokens: &[Token<'t>],
) -> bool { ... }
fn matches_type(
field_keyword: &[u8],
keyword: &[u8],
tokens: &[Token<'t>],
) -> bool { ... }
fn need_update(
field_keyword: &[u8],
keyword: &Token<'t>,
buffer: &[Token<'t>],
) -> bool { ... }
fn start<'tv>(
&mut self,
field_keyword: &[u8],
keyword: &Token<'t>,
tokens: &'tv [Token<'t>],
buffer: &mut Vec<Token<'t>>,
) -> Result<(bool, &'tv [Token<'t>]), CommandParseError> { ... }
fn rest<'tv>(tokens: &'tv [Token<'t>]) -> &'tv [Token<'t>] { ... }
fn need_push_keyword(keyword: &Token<'t>) -> bool { ... }
fn update_mode(keyword: &Token<'t>) -> bool { ... }
fn update<'tv>(
&mut self,
tokens: &'tv [Token<'t>],
) -> Result<(), CommandParseError> { ... }
fn end<'tv>(
self,
tokens: &'tv [Token<'t>],
) -> Result<Self, CommandParseError> { ... }
fn push_keyword(
&mut self,
buffer: &mut Vec<Token<'t>>,
keyword: &Token<'t>,
) -> bool { ... }
fn reset_mode() -> bool { ... }
}
Required Methods§
fn parse<'tv>( tokens: &'tv [Token<'t>], ) -> Result<(Self, &'tv [Token<'t>]), CommandParseError>
Provided Methods§
fn complete(tokens: &[Token<'t>]) -> Result<Self, CommandParseError>
fn default_value() -> Option<Self>
fn matches( &self, field_keyword: &[u8], keyword: &[u8], tokens: &[Token<'t>], ) -> bool
fn matches_type( field_keyword: &[u8], keyword: &[u8], tokens: &[Token<'t>], ) -> bool
fn need_update( field_keyword: &[u8], keyword: &Token<'t>, buffer: &[Token<'t>], ) -> bool
fn start<'tv>( &mut self, field_keyword: &[u8], keyword: &Token<'t>, tokens: &'tv [Token<'t>], buffer: &mut Vec<Token<'t>>, ) -> Result<(bool, &'tv [Token<'t>]), CommandParseError>
fn rest<'tv>(tokens: &'tv [Token<'t>]) -> &'tv [Token<'t>]
fn need_push_keyword(keyword: &Token<'t>) -> bool
fn update_mode(keyword: &Token<'t>) -> bool
fn update<'tv>( &mut self, tokens: &'tv [Token<'t>], ) -> Result<(), CommandParseError>
fn end<'tv>(self, tokens: &'tv [Token<'t>]) -> Result<Self, CommandParseError>
fn push_keyword( &mut self, buffer: &mut Vec<Token<'t>>, keyword: &Token<'t>, ) -> bool
fn reset_mode() -> bool
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.