Struct go_types::typ::SignatureDetail
source · pub struct SignatureDetail { /* private fields */ }Expand description
A SignatureDetail represents a (non-builtin) function or method type. The receiver is ignored when comparing signatures for identity.
Implementations§
source§impl SignatureDetail
impl SignatureDetail
pub fn new( scope: Option<ScopeKey>, recv: Option<ObjKey>, params: TypeKey, results: TypeKey, variadic: bool, objs: &TCObjects ) -> SignatureDetail
pub fn scope(&self) -> Option<ScopeKey>
sourcepub fn recv(&self) -> &Option<ObjKey>
pub fn recv(&self) -> &Option<ObjKey>
Recv returns the receiver of signature s (if a method), or nil if a function. It is ignored when comparing signatures for identity.
For an abstract method, Recv returns the enclosing interface either as a *Named or an *Interface. Due to embedding, an interface may contain methods whose receiver type is a different interface.
pub fn set_recv(&mut self, r: Option<ObjKey>)
pub fn params(&self) -> TypeKey
pub fn set_params(&mut self, p: TypeKey)
pub fn results(&self) -> TypeKey
pub fn variadic(&self) -> bool
pub fn params_count(&self, objs: &TCObjects) -> usize
pub fn results_count(&self, objs: &TCObjects) -> usize
Trait Implementations§
source§impl Clone for SignatureDetail
impl Clone for SignatureDetail
source§fn clone(&self) -> SignatureDetail
fn clone(&self) -> SignatureDetail
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