I am following the docs using the use_session_storage like this
let (session_id, ..) = use_session_storage::<i32, FromToStringCodec>("session_id");
The always getting the following error:
the trait bound `FromToStringCodec: codee::traits::Encoder<i32>` is not satisfied
the following other types implement trait `codee::traits::Encoder<T>`:
`codee::binary::from_to_bytes::FromToBytesCodec` implements `codee::traits::Encoder<bool>`
`codee::binary::from_to_bytes::FromToBytesCodec` implements `codee::traits::Encoder<f32>`
`codee::binary::from_to_bytes::FromToBytesCodec` implements `codee::traits::Encoder<f64>`
`codee::binary::from_to_bytes::FromToBytesCodec` implements `codee::traits::Encoder<i128>`
`codee::binary::from_to_bytes::FromToBytesCodec` implements `codee::traits::Encoder<i16>`
`codee::binary::from_to_bytes::FromToBytesCodec` implements `codee::traits::Encoder<i32>`
`codee::binary::from_to_bytes::FromToBytesCodec` implements `codee::traits::Encoder<i64>`
`codee::binary::from_to_bytes::FromToBytesCodec` implements `codee::traits::Encoder<i8>`
and 10 othersrustc[Click for full compiler diagnostic](rust-analyzer-diagnostics-view:/diagnostic%20message%20%5B2%5D?2#file%3A%2F%2F%2FUsers%2Fdanixx%2FDesktop%2Ftryrust%2Fsrc%2Fterminal.rs)
use_session_storage.rs(18, 8): required by a bound in `use_session_storage`
the trait bound `FromToStringCodec: codee::traits::Decoder<i32>` is not satisfied
the following other types implement trait `codee::traits::Decoder<T>`:
`codee::binary::from_to_bytes::FromToBytesCodec` implements `codee::traits::Decoder<bool>`
`codee::binary::from_to_bytes::FromToBytesCodec` implements `codee::traits::Decoder<f32>`
`codee::binary::from_to_bytes::FromToBytesCodec` implements `codee::traits::Decoder<f64>`
`codee::binary::from_to_bytes::FromToBytesCodec` implements `codee::traits::Decoder<i128>`
`codee::binary::from_to_bytes::FromToBytesCodec` implements `codee::traits::Decoder<i16>`
`codee::binary::from_to_bytes::FromToBytesCodec` implements `codee::traits::Decoder<i32>`
`codee::binary::from_to_bytes::FromToBytesCodec` implements `codee::traits::Decoder<i64>`
`codee::binary::from_to_bytes::FromToBytesCodec` implements `codee::traits::Decoder<i8>`
and 10 othersrustc[Click for full compiler diagnostic](rust-analyzer-diagnostics-view:/diagnostic%20message%20%5B3%5D?3#file%3A%2F%2F%2FUsers%2Fdanixx%2FDesktop%2Ftryrust%2Fsrc%2Fterminal.rs)
Update:
I installed the main repo, where the codee version is already 0.2.0 instead of 0.1.2 and it solved.
Hi there,
I am following the docs using the
use_session_storage
like thislet (session_id, ..) = use_session_storage::<i32, FromToStringCodec>("session_id");
The always getting the following error:
Update: I installed the main repo, where the codee version is already 0.2.0 instead of 0.1.2 and it solved.