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 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 moreSource§impl Debug for SignatureDetail
impl Debug for SignatureDetail
impl Copy for SignatureDetail
Auto Trait Implementations§
impl Freeze for SignatureDetail
impl RefUnwindSafe for SignatureDetail
impl Send for SignatureDetail
impl Sync for SignatureDetail
impl Unpin for SignatureDetail
impl UnwindSafe for SignatureDetail
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