pub struct CallRef {
pub name: String,
pub qualified_path: Option<String>,
pub receiver_type: Option<String>,
pub byte_offset: u32,
pub resolved: Option<DefId>,
}Expand description
A call site extracted from a definition body.
Fields§
§name: StringCallee function/method name (bare, without qualifier).
For scoped calls like mod_a::foo(), this is "foo".
For bare calls like foo(), this is "foo".
qualified_path: Option<String>Full qualified path for scoped calls, e.g. Some("mod_a::foo").
None for bare (unqualified) calls. When Some, resolve_calls
uses this for qualifier-based module disambiguation before falling
back to the bare name.
receiver_type: Option<String>Receiver type for method calls, inferred from local context.
Set to Some("Foo") when:
- The call is
self.method()insideimpl Foo { … }. - The call is
x.method()wherexhas an explicit type annotationx: Foo. - The call is
x.method()afterlet x = Foo::new().
None for free function calls, or when the receiver type cannot be
inferred from local context alone. When Some, resolve_calls prefers
defs whose enclosing impl scope matches the receiver type.
byte_offset: u32Byte offset of the call in the source file (for scoping to definitions).
resolved: Option<DefId>Resolved target definition, if resolution succeeded.
Trait Implementations§
Source§impl Archive for CallRef
impl Archive for CallRef
Source§const COPY_OPTIMIZATION: CopyOptimization<Self>
const COPY_OPTIMIZATION: CopyOptimization<Self>
serialize. Read moreSource§type Archived = ArchivedCallRef
type Archived = ArchivedCallRef
Source§type Resolver = CallRefResolver
type Resolver = CallRefResolver
Source§impl<__D: Fallible + ?Sized> Deserialize<CallRef, __D> for Archived<CallRef>where
String: Archive,
<String as Archive>::Archived: Deserialize<String, __D>,
Option<String>: Archive,
<Option<String> as Archive>::Archived: Deserialize<Option<String>, __D>,
u32: Archive,
<u32 as Archive>::Archived: Deserialize<u32, __D>,
Option<DefId>: Archive,
<Option<DefId> as Archive>::Archived: Deserialize<Option<DefId>, __D>,
impl<__D: Fallible + ?Sized> Deserialize<CallRef, __D> for Archived<CallRef>where
String: Archive,
<String as Archive>::Archived: Deserialize<String, __D>,
Option<String>: Archive,
<Option<String> as Archive>::Archived: Deserialize<Option<String>, __D>,
u32: Archive,
<u32 as Archive>::Archived: Deserialize<u32, __D>,
Option<DefId>: Archive,
<Option<DefId> as Archive>::Archived: Deserialize<Option<DefId>, __D>,
Auto Trait Implementations§
impl Freeze for CallRef
impl RefUnwindSafe for CallRef
impl Send for CallRef
impl Sync for CallRef
impl Unpin for CallRef
impl UnsafeUnpin for CallRef
impl UnwindSafe for CallRef
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> ArchiveUnsized for Twhere
T: Archive,
impl<T> ArchiveUnsized for Twhere
T: Archive,
Source§type Archived = <T as Archive>::Archived
type Archived = <T as Archive>::Archived
Archive, it may be
unsized. Read moreSource§fn archived_metadata(
&self,
) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
fn archived_metadata( &self, ) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync 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<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.