pub struct FunctionId(pub u32);Expand description
Names a Function in Program::functions.
§Scope and stability
A FunctionId is dense — it is a position in one Program’s
functions, not a name — and it means nothing outside that one
linked program. It is not stable across an edit to the package that
produced it: declarations are numbered first and lambdas and generic
instantiations are appended after them, so adding, removing or moving
an earlier one renumbers every later one. It is not a stable external
identity either, in the way a qualified name is — two builds of the
same source are not guaranteed to number a function the same way, and
nothing here promises they will.
Nothing may persist a bare FunctionId across an artifact boundary,
because there is no third thing to check it against once it is on
the far side of one. Every boundary Cove has today avoids the
question instead of answering it: cove build embeds the checked
source in the generated crate and lowers a fresh Program when
that crate is compiled, rather than serialising this one’s; the
trace and replay format keys an entry point by module and
function strings (Program::function_named resolves the
pair against whatever program is current, back into a FunctionId
of that run) and never writes the id itself; and the wasm
playground’s boundary is rendered text — crate::print’s
listing — not the program that produced it. No id crosses a boundary
today because nothing here has ever needed one to.
Tuple Fields§
§0: u32Implementations§
Trait Implementations§
Source§impl Clone for FunctionId
impl Clone for FunctionId
Source§fn clone(&self) -> FunctionId
fn clone(&self) -> FunctionId
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 FunctionId
Source§impl Debug for FunctionId
impl Debug for FunctionId
Source§impl Display for FunctionId
impl Display for FunctionId
impl Eq for FunctionId
Source§impl Hash for FunctionId
impl Hash for FunctionId
Source§impl Ord for FunctionId
impl Ord for FunctionId
Source§fn cmp(&self, other: &FunctionId) -> Ordering
fn cmp(&self, other: &FunctionId) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for FunctionId
impl PartialEq for FunctionId
Source§fn eq(&self, other: &FunctionId) -> bool
fn eq(&self, other: &FunctionId) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for FunctionId
impl PartialOrd for FunctionId
impl StructuralPartialEq for FunctionId
Auto Trait Implementations§
impl Freeze for FunctionId
impl RefUnwindSafe for FunctionId
impl Send for FunctionId
impl Sync for FunctionId
impl Unpin for FunctionId
impl UnsafeUnpin for FunctionId
impl UnwindSafe for FunctionId
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.