I’m implementing aweb application in rust using leptos with axum. I’m trying to route my application using the generate_route_list function from the leptos_axum crate. I then try to pass it to the AxumRouter through the leptos_routes() function of LeptosRoutes trait, but I get the following error:

error[E0599]: no method named `leptos_routes` found for struct `AxumRouter` in the current scope
   --> src/main.rs:135:9
    |
135 |     app.leptos_routes(&leptos_options, routes, || view! { <web_server::App/> });
    |         ^^^^^^^^^^^^^ method not found in `Router<_, _>`

`
The thing is the leptos_axum crate actually implements this method!

impl<S> LeptosRoutes<S> for axum::Router<S>
where
    LeptosOptions: FromRef<S>,
    S: Clone + Send + Sync + 'static,
{
    #[tracing::instrument(level = "trace", fields(error), skip_all)]
    fn leptos_routes<IV>(
        self,
        options: &S,
        paths: Vec<RouteListing>,
        app_fn: impl Fn() -> IV + Clone + Send + 'static,
    ) -> Self
    where
        IV: IntoView + 'static,
    {
        self.leptos_routes_with_context(options, paths, || {}, app_fn)
    }
...

My imports are the following:

use axum::{
    body::Body as AxumBody,
    http::Request,
    response::{IntoResponse, Response},
    routing::get,
    Router,
};
use leptos::*;
use leptos_axum::{generate_route_list, handle_server_fns_with_context, LeptosRoutes};
use tonic::{
    codec::CompressionEncoding,
    transport::Server,
    transport::{Identity, ServerTlsConfig},
};
use tower_http::cors::{AllowHeaders, AllowOrigin, CorsLayer};

I must be missing something, I do not understand what going on, please help.