pub enum Mode<'t> {
Directory,
Name,
Ext,
NameWe,
LastExt,
NameWle,
Path,
Absolute(BaseDir<'t>),
RealPath(BaseDir<'t>),
Program(Program<'t>),
}
Variants§
Directory
Directory without file name
Name
File name without directory
Ext
File name longest extension (.b.c from d/a.b.c)
NameWe
File name with neither the directory nor the longest extension
LastExt
File name last extension (.c from d/a.b.c)
NameWle
File name with neither the directory nor the last extension
Path
Legacy alias for DIRECTORY (use for CMake <= 2.8.11)
Absolute(BaseDir<'t>)
Full path to file
RealPath(BaseDir<'t>)
Full path to existing file with symlinks resolved
Program(Program<'t>)
Trait Implementations§
Source§impl<'t> CMakeParse<'t> for Mode<'t>
impl<'t> CMakeParse<'t> for Mode<'t>
fn matches_type(_: &[u8], keyword: &[u8], tokens: &[Token<'t>]) -> bool
fn parse<'tv>( tokens: &'tv [Token<'t>], ) -> Result<(Self, &'tv [Token<'t>]), CommandParseError>
fn need_push_keyword(keyword: &Token<'t>) -> bool
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 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 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
Source§impl<'t> CMakePositional<'t> for Mode<'t>
impl<'t> CMakePositional<'t> for Mode<'t>
fn positional<'tv>( default_name: &'static [u8], tokens: &'tv [Token<'t>], has_keyword: bool, ) -> Result<(Self, &'tv [Token<'t>]), CommandParseError>
fn positional_complete<'tv>( default_name: &'static [u8], tokens: &'tv [Token<'t>], has_keyword: bool, ) -> Result<(Self, &'tv [Token<'t>]), CommandParseError>
fn in_range<'tv>( default_name: &'static [u8], to: &'static [u8], allow_empty: bool, tokens: &'tv [Token<'t>], has_keyword: bool, ) -> Result<(Self, &'tv [Token<'t>]), CommandParseError>
Source§impl<'t> Ord for Mode<'t>
impl<'t> Ord for Mode<'t>
Source§impl<'t> PartialOrd for Mode<'t>
impl<'t> PartialOrd for Mode<'t>
impl<'t> Eq for Mode<'t>
impl<'t> StructuralPartialEq for Mode<'t>
Auto Trait Implementations§
impl<'t> Freeze for Mode<'t>
impl<'t> RefUnwindSafe for Mode<'t>
impl<'t> Send for Mode<'t>
impl<'t> Sync for Mode<'t>
impl<'t> Unpin for Mode<'t>
impl<'t> UnwindSafe for Mode<'t>
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