Fix Rust docs about generated API

This commit is contained in:
Simon Hausmann 2020-12-09 16:48:02 +01:00
parent c77109d257
commit c72c2a58ff

View file

@ -98,15 +98,15 @@ This documentation contains a documented generated component: [`docs::generated_
The following associated function are added to the component: The following associated function are added to the component:
- [`fn new() -> Pin<Rc<Self>>`](docs::generated_code::SampleComponent::new): to instantiate the component. - [`fn new() -> Self`](docs::generated_code::SampleComponent::new): to instantiate the component.
For each top-level property For each top-level property
- A setter [`fn set_<property_name>(&self, value: <PropertyType>)`](docs::generated_code::SampleComponent::set_counter) - A setter [`fn set_<property_name>(&self, value: <PropertyType>)`](docs::generated_code::SampleComponent::set_counter)
- A getter [`fn get_<property_name>(self: Pin<&Self>) -> <PropertyType>`](docs::generated_code::SampleComponent::get_counter) - A getter [`fn get_<property_name>(&self) -> <PropertyType>`](docs::generated_code::SampleComponent::get_counter)
For each top-level signal For each top-level signal
- [`fn emit_<signal_name>(self: Pin<&Self>)`](docs::generated_code::SampleComponent::emit_hello): to emit the signal - [`fn emit_<signal_name>(&self)`](docs::generated_code::SampleComponent::emit_hello): to emit the signal
- [`fn on_<signal_name>(self: Pin<&Self>, callback: impl Fn(<SignalArgs>) + 'static)`](docs::generated_code::SampleComponent::on_hello): to set the signal handler. - [`fn on_<signal_name>(&self, callback: impl Fn(<SignalArgs>) + 'static)`](docs::generated_code::SampleComponent::on_hello): to set the signal handler.
### Type Mappings ### Type Mappings