@@ -710,10 +710,23 @@ pub fn derive_godot_class(input: TokenStream) -> TokenStream {
710
710
/// `#[rpc]` implies `#[func]`. You can use both attributes together, if you need to configure other `#[func]`-specific keys.
711
711
///
712
712
/// For example, the following method declarations are all equivalent:
713
- /// ```
713
+ /// ```no_run
714
+ /// # // Polyfill without full codegen.
715
+ /// # #![allow(non_camel_case_types)]
716
+ /// # #[cfg(not(feature = "codegen-full"))]
717
+ /// # enum RpcMode { DISABLED, ANY_PEER, AUTHORITY }
718
+ /// # #[cfg(not(feature = "codegen-full"))]
719
+ /// # enum TransferMode { UNRELIABLE, UNRELIABLE_ORDERED, RELIABLE }
720
+ /// # #[cfg(not(feature = "codegen-full"))]
721
+ /// # pub struct RpcConfig { pub rpc_mode: RpcMode, pub transfer_mode: TransferMode, pub call_local: bool, pub channel: u32 }
722
+ /// # #[cfg(not(feature = "codegen-full"))]
723
+ /// # impl Default for RpcConfig { fn default() -> Self { todo!("never called") } }
724
+ /// # #[cfg(feature = "codegen-full")]
714
725
/// use godot::classes::multiplayer_api::RpcMode;
726
+ /// # #[cfg(feature = "codegen-full")]
715
727
/// use godot::classes::multiplayer_peer::TransferMode;
716
728
/// use godot::prelude::*;
729
+ /// # #[cfg(feature = "codegen-full")]
717
730
/// use godot::register::RpcConfig;
718
731
///
719
732
/// # #[derive(GodotClass)]
0 commit comments