#[repr(u8)]pub enum FileType {
Host = 0,
Vendored = 1,
Builtin = 2,
}Expand description
Distinguishes between the origins of source files.
Variants§
Host = 0
The file is part of the primary project source code. These files typically reside on the filesystem and are actively developed.
Vendored = 1
The file belongs to a third-party dependency (e.g., a Composer package).
These files exist on the filesystem within the project (e.g., in vendor/)
but are not considered part of the primary source code.
Builtin = 2
The file represents a built-in language construct (e.g., a core PHP function or class). These “files” do not exist on the filesystem and their content is typically provided as pre-defined stubs for analysis.
Implementations§
Source§impl FileType
impl FileType
Sourcepub const fn is_host(self) -> bool
pub const fn is_host(self) -> bool
Returns true if the file is a host file, meaning it is part of the project’s source code.
Sourcepub const fn is_vendored(self) -> bool
pub const fn is_vendored(self) -> bool
Returns true if the file is a vendored file, meaning it comes from an external library or dependency.
Sourcepub const fn is_builtin(self) -> bool
pub const fn is_builtin(self) -> bool
Returns true if the file is a built-in file, meaning it represents a core language construct.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FileType
impl<'de> Deserialize<'de> for FileType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Ord for FileType
impl Ord for FileType
Source§impl PartialOrd for FileType
impl PartialOrd for FileType
impl Copy for FileType
impl Eq for FileType
impl StructuralPartialEq for FileType
Auto Trait Implementations§
impl Freeze for FileType
impl RefUnwindSafe for FileType
impl Send for FileType
impl Sync for FileType
impl Unpin for FileType
impl UnwindSafe for FileType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more