pub struct MethodNode(/* private fields */);Expand description
Salsa input representing a single method or interface/trait method.
inferred_return_type is the Pass-2-derived return type, populated per
method by the priming sweep. Committed to Salsa serially after the
parallel sweep returns; see FunctionNode for the buffer-and-commit
pattern that resolves the historical “S3 deadlock”.
The node is keyed by (fqcn, method_name_lower) where fqcn is the
FQCN of the owning class/interface/trait and method_name_lower is
the PHP-normalised (lowercased) method name. Nodes for classes that are
removed from the codebase are marked active = false via
deactivate_class_methods rather than being dropped.
Implementations§
Source§impl MethodNode
impl MethodNode
pub fn ingredient(db: &dyn Database) -> &IngredientImpl<Self>
pub fn ingredient_mut( zalsa_mut: &mut Zalsa, ) -> (&mut IngredientImpl<Self>, &mut Runtime)
Source§impl MethodNode
impl MethodNode
pub fn new<Db_>( db: &Db_, fqcn: Arc<str>, name: Arc<str>, active: bool, params: Arc<[FnParam]>, return_type: Option<Union>, inferred_return_type: Option<Union>, template_params: Arc<[TemplateParam]>, assertions: Arc<[Assertion]>, throws: Arc<[Arc<str>]>, deprecated: Option<Arc<str>>, visibility: Visibility, is_static: bool, is_abstract: bool, is_final: bool, is_constructor: bool, is_pure: bool, location: Option<Location>, ) -> Self
pub fn builder( fqcn: Arc<str>, name: Arc<str>, active: bool, params: Arc<[FnParam]>, return_type: Option<Union>, inferred_return_type: Option<Union>, template_params: Arc<[TemplateParam]>, assertions: Arc<[Assertion]>, throws: Arc<[Arc<str>]>, deprecated: Option<Arc<str>>, visibility: Visibility, is_static: bool, is_abstract: bool, is_final: bool, is_constructor: bool, is_pure: bool, location: Option<Location>, ) -> <Self as HasBuilder>::Builder
pub fn fqcn<'db, Db_>(self, db: &'db Db_) -> Arc<str> ⓘ
pub fn name<'db, Db_>(self, db: &'db Db_) -> Arc<str> ⓘ
pub fn active<'db, Db_>(self, db: &'db Db_) -> bool
pub fn params<'db, Db_>(self, db: &'db Db_) -> Arc<[FnParam]> ⓘ
pub fn return_type<'db, Db_>(self, db: &'db Db_) -> Option<Union>
pub fn inferred_return_type<'db, Db_>(self, db: &'db Db_) -> Option<Union>
pub fn template_params<'db, Db_>(self, db: &'db Db_) -> Arc<[TemplateParam]> ⓘ
pub fn assertions<'db, Db_>(self, db: &'db Db_) -> Arc<[Assertion]> ⓘ
pub fn throws<'db, Db_>(self, db: &'db Db_) -> Arc<[Arc<str>]> ⓘ
pub fn deprecated<'db, Db_>(self, db: &'db Db_) -> Option<Arc<str>>
pub fn visibility<'db, Db_>(self, db: &'db Db_) -> Visibility
pub fn is_static<'db, Db_>(self, db: &'db Db_) -> bool
pub fn is_abstract<'db, Db_>(self, db: &'db Db_) -> bool
pub fn is_final<'db, Db_>(self, db: &'db Db_) -> bool
pub fn is_constructor<'db, Db_>(self, db: &'db Db_) -> bool
pub fn is_pure<'db, Db_>(self, db: &'db Db_) -> bool
Sourcepub fn location<'db, Db_>(self, db: &'db Db_) -> Option<Location>
pub fn location<'db, Db_>(self, db: &'db Db_) -> Option<Location>
Source location of the declaration. None for synthesized methods
(e.g. enum implicit cases/from/tryFrom).
pub fn set_fqcn<'db, Db_>( self, db: &'db mut Db_, ) -> impl Setter<FieldTy = Arc<str>> + use<'db, Db_>
pub fn set_name<'db, Db_>( self, db: &'db mut Db_, ) -> impl Setter<FieldTy = Arc<str>> + use<'db, Db_>
pub fn set_active<'db, Db_>( self, db: &'db mut Db_, ) -> impl Setter<FieldTy = bool> + use<'db, Db_>
pub fn set_params<'db, Db_>( self, db: &'db mut Db_, ) -> impl Setter<FieldTy = Arc<[FnParam]>> + use<'db, Db_>
pub fn set_return_type<'db, Db_>( self, db: &'db mut Db_, ) -> impl Setter<FieldTy = Option<Union>> + use<'db, Db_>
pub fn set_inferred_return_type<'db, Db_>( self, db: &'db mut Db_, ) -> impl Setter<FieldTy = Option<Union>> + use<'db, Db_>
pub fn set_template_params<'db, Db_>( self, db: &'db mut Db_, ) -> impl Setter<FieldTy = Arc<[TemplateParam]>> + use<'db, Db_>
pub fn set_assertions<'db, Db_>( self, db: &'db mut Db_, ) -> impl Setter<FieldTy = Arc<[Assertion]>> + use<'db, Db_>
pub fn set_throws<'db, Db_>( self, db: &'db mut Db_, ) -> impl Setter<FieldTy = Arc<[Arc<str>]>> + use<'db, Db_>
pub fn set_deprecated<'db, Db_>( self, db: &'db mut Db_, ) -> impl Setter<FieldTy = Option<Arc<str>>> + use<'db, Db_>
pub fn set_visibility<'db, Db_>( self, db: &'db mut Db_, ) -> impl Setter<FieldTy = Visibility> + use<'db, Db_>
pub fn set_is_static<'db, Db_>( self, db: &'db mut Db_, ) -> impl Setter<FieldTy = bool> + use<'db, Db_>
pub fn set_is_abstract<'db, Db_>( self, db: &'db mut Db_, ) -> impl Setter<FieldTy = bool> + use<'db, Db_>
pub fn set_is_final<'db, Db_>( self, db: &'db mut Db_, ) -> impl Setter<FieldTy = bool> + use<'db, Db_>
pub fn set_is_constructor<'db, Db_>( self, db: &'db mut Db_, ) -> impl Setter<FieldTy = bool> + use<'db, Db_>
pub fn set_is_pure<'db, Db_>( self, db: &'db mut Db_, ) -> impl Setter<FieldTy = bool> + use<'db, Db_>
pub fn set_location<'db, Db_>( self, db: &'db mut Db_, ) -> impl Setter<FieldTy = Option<Location>> + use<'db, Db_>
Sourcepub fn default_debug_fmt(this: Self, f: &mut Formatter<'_>) -> Resultwhere
for<'__trivial_bounds, '__trivial_bounds> Arc<str>: Debug,
for<'__trivial_bounds, '__trivial_bounds, '__trivial_bounds, '__trivial_bounds, '__trivial_bounds, '__trivial_bounds> bool: Debug,
for<'__trivial_bounds> Arc<[FnParam]>: Debug,
for<'__trivial_bounds, '__trivial_bounds> Option<Union>: Debug,
for<'__trivial_bounds> Arc<[TemplateParam]>: Debug,
for<'__trivial_bounds> Arc<[Assertion]>: Debug,
for<'__trivial_bounds> Arc<[Arc<str>]>: Debug,
for<'__trivial_bounds> Option<Arc<str>>: Debug,
for<'__trivial_bounds> Visibility: Debug,
for<'__trivial_bounds> Option<Location>: Debug,
pub fn default_debug_fmt(this: Self, f: &mut Formatter<'_>) -> Resultwhere
for<'__trivial_bounds, '__trivial_bounds> Arc<str>: Debug,
for<'__trivial_bounds, '__trivial_bounds, '__trivial_bounds, '__trivial_bounds, '__trivial_bounds, '__trivial_bounds> bool: Debug,
for<'__trivial_bounds> Arc<[FnParam]>: Debug,
for<'__trivial_bounds, '__trivial_bounds> Option<Union>: Debug,
for<'__trivial_bounds> Arc<[TemplateParam]>: Debug,
for<'__trivial_bounds> Arc<[Assertion]>: Debug,
for<'__trivial_bounds> Arc<[Arc<str>]>: Debug,
for<'__trivial_bounds> Option<Arc<str>>: Debug,
for<'__trivial_bounds> Visibility: Debug,
for<'__trivial_bounds> Option<Location>: Debug,
Default debug formatting for this struct (may be useful if you define your own Debug impl)
Trait Implementations§
Source§impl Clone for MethodNode
impl Clone for MethodNode
Source§fn clone(&self) -> MethodNode
fn clone(&self) -> MethodNode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Configuration for MethodNode
impl Configuration for MethodNode
const LOCATION: Location
const DEBUG_NAME: &'static str = "MethodNode"
const FIELD_DEBUG_NAMES: &'static [&'static str]
Source§type Struct = MethodNode
type Struct = MethodNode
Id)Source§type Fields = (Arc<str>, Arc<str>, bool, Arc<[FnParam]>, Option<Union>, Option<Union>, Arc<[TemplateParam]>, Arc<[Assertion]>, Arc<[Arc<str>]>, Option<Arc<str>>, Visibility, bool, bool, bool, bool, bool, Option<Location>)
type Fields = (Arc<str>, Arc<str>, bool, Arc<[FnParam]>, Option<Union>, Option<Union>, Arc<[TemplateParam]>, Arc<[Assertion]>, Arc<[Arc<str>]>, Option<Arc<str>>, Visibility, bool, bool, bool, bool, bool, Option<Location>)
type Revisions = [Revision; 17]
type Durabilities = [Durability; 17]
Source§fn serialize<S: Serializer>(
fields: &Self::Fields,
serializer: S,
) -> Result<S::Ok, S::Error>
fn serialize<S: Serializer>( fields: &Self::Fields, serializer: S, ) -> Result<S::Ok, S::Error>
serde. Read moreSource§fn deserialize<'de, D: Deserializer<'de>>(
deserializer: D,
) -> Result<Self::Fields, D::Error>
fn deserialize<'de, D: Deserializer<'de>>( deserializer: D, ) -> Result<Self::Fields, D::Error>
serde. Read moreSource§impl HasJar for MethodNode
impl HasJar for MethodNode
Source§impl Hash for MethodNode
impl Hash for MethodNode
Source§impl PartialEq for MethodNode
impl PartialEq for MethodNode
Source§impl SalsaStructInDb for MethodNode
impl SalsaStructInDb for MethodNode
type MemoIngredientMap = MemoIngredientSingletonIndex
Source§fn lookup_ingredient_index(aux: &Zalsa) -> IngredientIndices
fn lookup_ingredient_index(aux: &Zalsa) -> IngredientIndices
Source§fn entries(zalsa: &Zalsa) -> impl Iterator<Item = DatabaseKeyIndex> + '_
fn entries(zalsa: &Zalsa) -> impl Iterator<Item = DatabaseKeyIndex> + '_
Source§impl Update for MethodNode
impl Update for MethodNode
impl Copy for MethodNode
impl Eq for MethodNode
impl StructuralPartialEq for MethodNode
Auto Trait Implementations§
impl Freeze for MethodNode
impl RefUnwindSafe for MethodNode
impl Send for MethodNode
impl Sync for MethodNode
impl Unpin for MethodNode
impl UnsafeUnpin for MethodNode
impl UnwindSafe for MethodNode
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> HashEqLike<&T> for T
impl<T> HashEqLike<&T> for T
Source§impl<T> HashEqLike<Cow<'_, T>> for T
impl<T> HashEqLike<Cow<'_, T>> for T
Source§impl<T> HashEqLike<T> for T
impl<T> HashEqLike<T> for T
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 moreSource§impl<D> OwoColorize for D
impl<D> OwoColorize for D
Source§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Source§fn black(&self) -> FgColorDisplay<'_, Black, Self>
fn black(&self) -> FgColorDisplay<'_, Black, Self>
Source§fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
Source§fn red(&self) -> FgColorDisplay<'_, Red, Self>
fn red(&self) -> FgColorDisplay<'_, Red, Self>
Source§fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
Source§fn green(&self) -> FgColorDisplay<'_, Green, Self>
fn green(&self) -> FgColorDisplay<'_, Green, Self>
Source§fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
Source§fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
Source§fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
Source§fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
Source§fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
Source§fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
Source§fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
Source§fn white(&self) -> FgColorDisplay<'_, White, Self>
fn white(&self) -> FgColorDisplay<'_, White, Self>
Source§fn on_white(&self) -> BgColorDisplay<'_, White, Self>
fn on_white(&self) -> BgColorDisplay<'_, White, Self>
Source§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Source§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Source§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Source§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Source§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Source§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Source§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Source§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Source§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Source§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Source§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Source§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Source§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Source§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Source§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Source§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Source§fn bold(&self) -> BoldDisplay<'_, Self>
fn bold(&self) -> BoldDisplay<'_, Self>
Source§fn dimmed(&self) -> DimDisplay<'_, Self>
fn dimmed(&self) -> DimDisplay<'_, Self>
Source§fn italic(&self) -> ItalicDisplay<'_, Self>
fn italic(&self) -> ItalicDisplay<'_, Self>
Source§fn underline(&self) -> UnderlineDisplay<'_, Self>
fn underline(&self) -> UnderlineDisplay<'_, Self>
Source§fn blink(&self) -> BlinkDisplay<'_, Self>
fn blink(&self) -> BlinkDisplay<'_, Self>
Source§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Source§fn reversed(&self) -> ReversedDisplay<'_, Self>
fn reversed(&self) -> ReversedDisplay<'_, Self>
Source§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Source§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg or
a color-specific method, such as OwoColorize::green, Read moreSource§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg or
a color-specific method, such as OwoColorize::on_yellow, Read more