Struct mica::ll::bytecode::MethodSignature
source · pub struct MethodSignature {
pub name: Rc<str>,
pub parameter_count: MethodParameterCount,
pub trait_id: Option<TraitIndex>,
}
Expand description
The signature of a method (its name, argument count, and enclosing trait).
Fields§
§name: Rc<str>
§parameter_count: MethodParameterCount
This arity number includes the implicit self
parameter.
trait_id: Option<TraitIndex>
The index of the trait this signature belongs to.
When None
, the function is free and does not belong to any trait.
Implementations§
source§impl MethodSignature
impl MethodSignature
sourcepub fn new(name: Rc<str>, parameter_count: MethodParameterCount) -> Self
pub fn new(name: Rc<str>, parameter_count: MethodParameterCount) -> Self
Creates a new method signature for a method that does not belong to a trait.
sourcepub fn render(&self, env: &Environment) -> RenderedSignature
pub fn render(&self, env: &Environment) -> RenderedSignature
Renders this signature into one that can be formatted.
Trait Implementations§
source§impl Clone for MethodSignature
impl Clone for MethodSignature
source§fn clone(&self) -> MethodSignature
fn clone(&self) -> MethodSignature
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 moresource§impl Debug for MethodSignature
impl Debug for MethodSignature
source§impl Hash for MethodSignature
impl Hash for MethodSignature
source§impl PartialEq<MethodSignature> for MethodSignature
impl PartialEq<MethodSignature> for MethodSignature
source§fn eq(&self, other: &MethodSignature) -> bool
fn eq(&self, other: &MethodSignature) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.