pub struct MethodInfo { /* private fields */ }Expand description
MethodInfo represents an interface method. At least one of src or fun must be non-None. (Methods declared in the current package have a non-None scope and src, and eventually a non-None fun field; imported and pre- declared methods have a None scope and src, and only a non-None fun field.)
Implementations§
Source§impl MethodInfo
impl MethodInfo
pub fn with_fun(fun: ObjKey) -> MethodInfo
pub fn with_scope_src(skey: ScopeKey, fkey: FieldKey) -> MethodInfo
pub fn scope(&self) -> Option<ScopeKey>
pub fn src(&self) -> Option<FieldKey>
pub fn func(&self) -> Option<ObjKey>
pub fn set_func(&self, func: ObjKey)
pub fn fmt( &self, f: &mut Formatter<'_>, tc_objs: &TCObjects, ast_objs: &AstObjects, ) -> Result
pub fn pos(&self, tc_objs: &TCObjects, ast_objs: &AstObjects) -> Pos
pub fn id<'a>( &self, pkey: PackageKey, tc_objs: &'a TCObjects, ast_objs: &'a AstObjects, ) -> Cow<'a, str>
Trait Implementations§
Source§impl Clone for MethodInfo
impl Clone for MethodInfo
Source§fn clone(&self) -> MethodInfo
fn clone(&self) -> MethodInfo
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 moreAuto Trait Implementations§
impl Freeze for MethodInfo
impl !RefUnwindSafe for MethodInfo
impl !Send for MethodInfo
impl !Sync for MethodInfo
impl Unpin for MethodInfo
impl !UnwindSafe for MethodInfo
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