pub struct IncludeGuard {
pub scope: Option<Scope>,
}
Expand description
Provides an include guard for the file currently being processed by CMake.
Reference: https://cmake.org/cmake/help/v3.26/command/include_guard.html
Fields§
§scope: Option<Scope>
Trait Implementations§
Source§impl<'t> CMakeParse<'t> for IncludeGuard
impl<'t> CMakeParse<'t> for IncludeGuard
fn parse<'tv>( tokens: &'tv [Token<'t>], ) -> Result<(Self, &'tv [Token<'t>]), CommandParseError>
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
Source§impl<'t> CMakePositional<'t> for IncludeGuard
impl<'t> CMakePositional<'t> for IncludeGuard
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 Clone for IncludeGuard
impl Clone for IncludeGuard
Source§fn clone(&self) -> IncludeGuard
fn clone(&self) -> IncludeGuard
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for IncludeGuard
impl Debug for IncludeGuard
Source§impl Hash for IncludeGuard
impl Hash for IncludeGuard
Source§impl Ord for IncludeGuard
impl Ord for IncludeGuard
Source§fn cmp(&self, other: &IncludeGuard) -> Ordering
fn cmp(&self, other: &IncludeGuard) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for IncludeGuard
impl PartialEq for IncludeGuard
Source§impl PartialOrd for IncludeGuard
impl PartialOrd for IncludeGuard
Source§impl ToCommandScope for IncludeGuard
impl ToCommandScope for IncludeGuard
fn to_command_scope(&self) -> CommandScope
impl Eq for IncludeGuard
impl StructuralPartialEq for IncludeGuard
Auto Trait Implementations§
impl Freeze for IncludeGuard
impl RefUnwindSafe for IncludeGuard
impl Send for IncludeGuard
impl Sync for IncludeGuard
impl Unpin for IncludeGuard
impl UnwindSafe for IncludeGuard
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