pub struct NewClientFn {
pub fn_name: FnName,
pub class: Rc<CapabilityIdent>,
pub client_type: Ident,
pub error_type: Option<Type>,
pub body: Block,
pub attrs: Vec<Attribute>,
pub is_async: bool,
}Fields§
§fn_name: FnName§class: Rc<CapabilityIdent>§client_type: Ident§error_type: Option<Type>§body: Block§attrs: Vec<Attribute>§is_async: boolImplementations§
Source§impl NewClientFn
impl NewClientFn
pub fn parse(f: &ImplItemFn, class: &Rc<CapabilityIdent>) -> Result<Self>
Sourcepub fn generate_impl_method(&self) -> TokenStream
pub fn generate_impl_method(&self) -> TokenStream
Generate the impl method (preserves original)
Sourcepub fn generate_export(&self) -> TokenStream
pub fn generate_export(&self) -> TokenStream
Generate the export entry for the init function
pub fn generate_capability_ffi(&self) -> TokenStream
Sourcepub fn generate_client_wasm(&self) -> TokenStream
pub fn generate_client_wasm(&self) -> TokenStream
Generates the extern declaration for the WASM import.
This corresponds to generate_client_wasm requested in the prompt.
Sourcepub fn generate_wasm_call(&self, module: Option<&Ident>) -> TokenStream
pub fn generate_wasm_call(&self, module: Option<&Ident>) -> TokenStream
Generates the call expression used inside the client’s register method.
This corresponds to generate_wasm_call.
Sourcepub fn generate_client_impl(&self, module: Option<&Ident>) -> TokenStream
pub fn generate_client_impl(&self, module: Option<&Ident>) -> TokenStream
Generates the full client-side implementation of the register method. The user prompt referred to this as “generate_client_wasm needs to generate impl MyClient”.
Trait Implementations§
Source§impl Clone for NewClientFn
impl Clone for NewClientFn
Source§fn clone(&self) -> NewClientFn
fn clone(&self) -> NewClientFn
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !Send for NewClientFn
impl !Sync for NewClientFn
impl Freeze for NewClientFn
impl RefUnwindSafe for NewClientFn
impl Unpin for NewClientFn
impl UnsafeUnpin for NewClientFn
impl UnwindSafe for NewClientFn
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