Skip to repository content22 lines · 647 B · rust
tenant.openagents/omega
No repository description is available.
OpenAgents Git authority 2026-07-28T03:59:45.745Z Public web read
NIP-34 coordinate
30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omegaMaintainersHidden in public view
References2 branches · 1 tag
Read-only clone
git clone https://openagents.com/git/tenant.openagents/omega.gitBrowse files
derive_render.rs
1use proc_macro::TokenStream;
2use quote::quote;
3use syn::{DeriveInput, parse_macro_input};
4
5pub fn derive_render(input: TokenStream) -> TokenStream {
6 let ast = parse_macro_input!(input as DeriveInput);
7 let type_name = &ast.ident;
8 let (impl_generics, type_generics, where_clause) = ast.generics.split_for_impl();
9
10 let r#gen = quote! {
11 impl #impl_generics gpui::Render for #type_name #type_generics
12 #where_clause
13 {
14 fn render(&mut self, _window: &mut gpui::Window, _cx: &mut gpui::Context<Self>) -> impl gpui::Element {
15 gpui::Empty
16 }
17 }
18 };
19
20 r#gen.into()
21}
22