pub struct StdBinding {
pub kind: StdBindingKind,
pub receiver: &'static str,
pub method: &'static str,
pub module: &'static str,
pub function: &'static str,
}Expand description
A builtin method or associated function whose implementation is Cove source rather than Rust.
This is the fact cove_ir’s lowering reads to turn items.isEmpty()
into an ordinary call to a declared function instead of a
CallBuiltin: the receiver and method name are what a call site already
has, and the module and function name are where to send it.
Fields§
§kind: StdBindingKindWhether method names a method or an associated function of
receiver. See StdBindingKind.
receiver: &'static strThe builtin type the method is called on, such as "Array".
method: &'static strThe method or associated function name Cove source calls, such as
"isEmpty".
module: &'static strThe standard-library module the implementation lives in, such as
"std.array".
function: &'static strThe function within that module, such as "isEmpty". Usually the
same spelling as method, but named separately because nothing
requires it to be — an associated binding in particular cannot share
its module function’s name with its method counterpart, since a
module cannot declare the same name twice.
Trait Implementations§
Source§impl Clone for StdBinding
impl Clone for StdBinding
Source§fn clone(&self) -> StdBinding
fn clone(&self) -> StdBinding
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for StdBinding
Source§impl Debug for StdBinding
impl Debug for StdBinding
impl Eq for StdBinding
Source§impl PartialEq for StdBinding
impl PartialEq for StdBinding
Source§fn eq(&self, other: &StdBinding) -> bool
fn eq(&self, other: &StdBinding) -> bool
self and other values to be equal, and is used by ==.