Enum wasmtime_jit::trampoline::ir::ExternalName [−][src]
The name of an external is either a reference to a user-defined symbol table, or a short sequence of ascii bytes so that test cases do not have to keep track of a symbol table.
External names are primarily used as keys by code using Cranelift to map
from a cranelift_codegen::ir::FuncRef
or similar to additional associated
data.
External names can also serve as a primitive testing and debugging tool.
In particular, many .clif
test files use function names to identify
functions.
Variants
A name in a user-defined symbol table. Cranelift does not interpret these numbers in any way.
A test case function name of up to a hardcoded amount of ascii characters. This is not intended to be used outside test cases.
Fields of TestCase
LibCall(LibCall)
A well-known runtime library function.
Implementations
impl ExternalName
[src]
pub fn testcase<T>(v: T) -> ExternalName where
T: AsRef<[u8]>,
[src]
T: AsRef<[u8]>,
Creates a new external name from a sequence of bytes. Caller is expected
to guarantee bytes are only ascii alphanumeric or _
.
Examples
// Create `ExternalName` from a string. let name = ExternalName::testcase("hello"); assert_eq!(name.to_string(), "%hello");
pub fn user(namespace: u32, index: u32) -> ExternalName
[src]
Create a new external name from user-provided integer indices.
Examples
// Create `ExternalName` from integer indices let name = ExternalName::user(123, 456); assert_eq!(name.to_string(), "u123:456");
Trait Implementations
impl Clone for ExternalName
[src]
pub fn clone(&self) -> ExternalName
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ExternalName
[src]
impl Default for ExternalName
[src]
pub fn default() -> ExternalName
[src]
impl Display for ExternalName
[src]
impl Eq for ExternalName
[src]
impl FromStr for ExternalName
[src]
type Err = ()
The associated error which can be returned from parsing.
pub fn from_str(s: &str) -> Result<ExternalName, <ExternalName as FromStr>::Err>
[src]
impl PartialEq<ExternalName> for ExternalName
[src]
pub fn eq(&self, other: &ExternalName) -> bool
[src]
pub fn ne(&self, other: &ExternalName) -> bool
[src]
impl StructuralEq for ExternalName
[src]
impl StructuralPartialEq for ExternalName
[src]
Auto Trait Implementations
impl RefUnwindSafe for ExternalName
impl Send for ExternalName
impl Sync for ExternalName
impl Unpin for ExternalName
impl UnwindSafe for ExternalName
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
[src]
pub const ALIGN: usize
[src]
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
[src]
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
[src]
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
[src]
pub unsafe fn drop(ptr: usize)
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,