You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: gen.rs
    path of file: ./repos/Relm4/relm4-macros/src/menu
    
    the code of the file until where you have to start completion: use proc_macro2::{Span as Span2, TokenStream as TokenStream2};
use quote::{quote, quote_spanned};
use syn::{spanned::Spanned, Ident, LitStr};

use super::{Menu, MenuElement, MenuEntry, MenuItem, MenuSection, Menus, SubMenu};

impl Menus {
    pub(crate) fn menus_stream(&self) -> TokenStream2 {
        let mut menu_stream = TokenStream2::new();

        for item in &self.items {
            menu_stream.extend(item.menu_stream());
        }

        menu_stream
    }
}

i
    
    fn entry_stream(&self, parent_ident: &Ident) -> TokenStream2 {
        let expr = &self.expr;
        let ty = &self.action_ty;

        if let Some(value) = &self.value {
            quote_spanned! {
                expr.span() =>
                    let new_entry = relm4::actions::RelmAction::<#ty>::to_menu_item_with_target_value(#expr, &#value);
                    #parent_ident.append_item(&new_entry);
            }
        } else {
            quote_spanned! {
                expr.span() =>
                    let new_entry = relm4::actions::RelmAction::<#ty>::to_menu_item(#expr);
                    #parent_ident.append_item(&new_entry);
            }
        }
    }