Struct go_types::check::MethodInfo
source · 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 copy 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 more