pub trait MatchableTrait {
// Required method
fn elements(&self) -> &[Matchable];
// Provided methods
fn get_type(&self) -> SyntaxKind { ... }
fn match_grammar(&self, _dialect: &Dialect) -> Option<Matchable> { ... }
fn is_optional(&self) -> bool { ... }
fn simple(
&self,
parse_context: &ParseContext<'_>,
crumbs: Option<Vec<&str>>,
) -> Option<(HashSet<String>, SyntaxSet)> { ... }
fn match_segments(
&self,
_segments: &[ErasedSegment],
_idx: u32,
_parse_context: &mut ParseContext<'_>,
) -> Result<MatchResult, SQLParseError> { ... }
fn cache_key(&self) -> MatchableCacheKey { ... }
fn copy(
&self,
_insert: Option<Vec<Matchable>>,
_at: Option<usize>,
_before: Option<Matchable>,
_remove: Option<Vec<Matchable>>,
_terminators: Vec<Matchable>,
_replace_terminators: bool,
) -> Matchable { ... }
}Required Methods§
Provided Methods§
fn get_type(&self) -> SyntaxKind
fn match_grammar(&self, _dialect: &Dialect) -> Option<Matchable>
fn is_optional(&self) -> bool
fn simple( &self, parse_context: &ParseContext<'_>, crumbs: Option<Vec<&str>>, ) -> Option<(HashSet<String>, SyntaxSet)>
fn match_segments( &self, _segments: &[ErasedSegment], _idx: u32, _parse_context: &mut ParseContext<'_>, ) -> Result<MatchResult, SQLParseError>
fn cache_key(&self) -> MatchableCacheKey
fn copy( &self, _insert: Option<Vec<Matchable>>, _at: Option<usize>, _before: Option<Matchable>, _remove: Option<Vec<Matchable>>, _terminators: Vec<Matchable>, _replace_terminators: bool, ) -> Matchable
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".