pub struct ParsedFunctionName {
pub site: ParsedFunctionSite,
pub function: ParsedFunctionReference,
}Fields§
§site: ParsedFunctionSite§function: ParsedFunctionReferenceImplementations§
Source§impl ParsedFunctionName
impl ParsedFunctionName
pub fn new(site: ParsedFunctionSite, function: ParsedFunctionReference) -> Self
pub fn global(name: String) -> Self
pub fn on_interface(interface: String, function: String) -> Self
pub fn parse(name: impl AsRef<str>) -> Result<Self, String>
pub fn site(&self) -> &ParsedFunctionSite
pub fn function(&self) -> &ParsedFunctionReference
pub fn method_as_static(&self) -> Option<Self>
pub fn is_constructor(&self) -> Option<&str>
pub fn is_method(&self) -> Option<&str>
pub fn is_static_method(&self) -> Option<&str>
pub fn with_site(&self, site: ParsedFunctionSite) -> Self
Sourcepub fn wasm_component_export_path(&self) -> Vec<String>
pub fn wasm_component_export_path(&self) -> Vec<String>
Segments for resolving a WebAssembly component export via nested instance names, then the function export name.
Packaged WIT paths like component:pkg/iface.{fn} identify the interface in metadata, but
component worlds usually export the interface instance at the root as iface, not as a
nested export named component:pkg. Runtimes should walk Component::get_export_index with
these segments (for example ["inventory", "lookup-sku"]), not a path derived from splitting
the full ParsedFunctionSite::interface_name string.
Sourcepub fn wasm_component_export_path_candidates(&self) -> Vec<Vec<String>>
pub fn wasm_component_export_path_candidates(&self) -> Vec<Vec<String>>
Like wasm_component_export_path, but includes common
alternate spellings for the last segment (WIT kebab-case vs snake_case in lowered names).
Trait Implementations§
Source§impl Clone for ParsedFunctionName
impl Clone for ParsedFunctionName
Source§fn clone(&self) -> ParsedFunctionName
fn clone(&self) -> ParsedFunctionName
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 ParsedFunctionName
impl Debug for ParsedFunctionName
Source§impl<'de> Deserialize<'de> for ParsedFunctionName
impl<'de> Deserialize<'de> for ParsedFunctionName
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ParsedFunctionName
impl Display for ParsedFunctionName
Source§impl Hash for ParsedFunctionName
impl Hash for ParsedFunctionName
Source§impl PartialEq for ParsedFunctionName
impl PartialEq for ParsedFunctionName
Source§impl Serialize for ParsedFunctionName
impl Serialize for ParsedFunctionName
impl Eq for ParsedFunctionName
impl StructuralPartialEq for ParsedFunctionName
Auto Trait Implementations§
impl Freeze for ParsedFunctionName
impl RefUnwindSafe for ParsedFunctionName
impl Send for ParsedFunctionName
impl Sync for ParsedFunctionName
impl Unpin for ParsedFunctionName
impl UnsafeUnpin for ParsedFunctionName
impl UnwindSafe for ParsedFunctionName
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.