pub enum MagicConstKind {
Class,
Dir,
File,
Function,
Line,
Method,
Namespace,
Trait,
Property,
}Variants§
Class
__CLASS__ — name of the current class, or empty string outside a class.
Dir
__DIR__ — directory of the current file.
File
__FILE__ — absolute path of the current file.
Function
__FUNCTION__ — name of the current function or closure.
Line
__LINE__ — current line number in the source file.
Method
__METHOD__ — name of the current method including its class: ClassName::methodName.
Namespace
__NAMESPACE__ — name of the current namespace, or empty string in the global namespace.
Trait
__TRAIT__ — name of the current trait, or empty string outside a trait.
Property
__PROPERTY__ — name of the current property inside a property hook (PHP 8.4+).
Trait Implementations§
Source§impl Clone for MagicConstKind
impl Clone for MagicConstKind
Source§fn clone(&self) -> MagicConstKind
fn clone(&self) -> MagicConstKind
Returns a duplicate 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 MagicConstKind
impl Debug for MagicConstKind
Source§impl PartialEq for MagicConstKind
impl PartialEq for MagicConstKind
Source§impl Serialize for MagicConstKind
impl Serialize for MagicConstKind
impl Copy for MagicConstKind
impl Eq for MagicConstKind
impl StructuralPartialEq for MagicConstKind
Auto Trait Implementations§
impl Freeze for MagicConstKind
impl RefUnwindSafe for MagicConstKind
impl Send for MagicConstKind
impl Sync for MagicConstKind
impl Unpin for MagicConstKind
impl UnsafeUnpin for MagicConstKind
impl UnwindSafe for MagicConstKind
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