You can declare a struct and its impl inside a function, if you want, but that doesn't let them capture variables. (I've given some thought about whether a macro could add this feature, and it could do some cases, but the details of getting it to work adequately, and the cases in which it would work, are actually quite tricky.)
But if you're going to pack inside the function and unpack when you call it, then that sounds like a struct with a bunch of Fn fields, that aren't strictly methods.
Trying to translate any OO-code to Rust is the worst idea any beginner can get, but there are some kinds of user-defined types in Rust: struct, enum and union. You can read about these ones in the reference, pages 10.1.8..=10.1.10.