pub enum RootBinding {
Early,
Late,
Unsupported,
}Expand description
How a type-relative root (self::, parent::, static::) binds.
§Examples
use resolve_lang::{Policy, RootBinding};
// PHP: `static::` is late static binding, resolved at run time.
assert_eq!(Policy::php().static_root(), RootBinding::Late);
assert_eq!(Policy::php().self_root(), RootBinding::Early);Variants§
Early
Bound at resolution time against the enclosing class (or its first
base, for parent::): a member found there is resolved now; one not
found is left to type-directed resolution.
Late
Bound late (at run time or by the type checker): the whole path is
left type-directed (unresolved = segments).
Unsupported
The language has no such root; a path using it is reported.
Trait Implementations§
Source§impl Clone for RootBinding
impl Clone for RootBinding
impl Copy for RootBinding
Source§impl Debug for RootBinding
impl Debug for RootBinding
impl Eq for RootBinding
Source§impl Hash for RootBinding
impl Hash for RootBinding
Source§impl PartialEq for RootBinding
impl PartialEq for RootBinding
impl StructuralPartialEq for RootBinding
Auto Trait Implementations§
impl Freeze for RootBinding
impl RefUnwindSafe for RootBinding
impl Send for RootBinding
impl Sync for RootBinding
impl Unpin for RootBinding
impl UnsafeUnpin for RootBinding
impl UnwindSafe for RootBinding
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