Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
18 views

Hi to the rust community. I have 2 somewhat related questions and I am hoping for answers. The 1st question is: Let's assume that I have a struct as shown below: pub struct MyStruct { a: i64, ...
SpatialFuel's user avatar
0 votes
1 answer
30 views

I coded an app that should sync git repos to our company's network hosts. Since I'm also testing the facilities I thought I'd naturally use the strategy pattern and have the executing function use ...
glades's user avatar
  • 5,392
Best practices
0 votes
1 replies
29 views

I'm trying to make a struct that has dynamic methods by storing FnMuts in the struct. The FnMuts would be a function written in a scripting language like Python or Lua, but there might be some cases ...
Choosechee's user avatar
-3 votes
1 answer
54 views

I am trying to use RUSTLS in my SMTP listener and I am getting error: RCPT TO: <[email protected]> RENEGOTIATING 40D7CFBDBE7D0000:error:0A00010A:SSL routines:can_renegotiate:wrong ssl version:../ssl/...
Shawn Williams's user avatar
4 votes
1 answer
73 views

I'm trying to deserialize a JSON object, and use the value from one of its fields for two different fields in the Rust struct. I've seen similar questions to this, but all of them were trying to do ...
Rowaaaan's user avatar
-4 votes
0 answers
43 views

I have this reduced example code: fn double(x: i32) -> i32 { x * 2 } trait Trait { fn go(&self, x: i32) -> i32; } impl Trait for fn(i32) -> i32 { fn go(&self, x: i32) -&...
Nicola Gigante's user avatar
4 votes
2 answers
101 views

I'm building a small regex VM that matches text with bytecode-like instructions. Take the following enum: pub type Pc = usize; pub enum Inst { Char(char, Pc), Range(char, char, Pc), Any(...
Levente Bokor's user avatar
4 votes
1 answer
147 views

I must flip some lines of pixels around their centers (not the whole image). My first solution in simple, safe Rust was this: /** It's a square, each side (width & height) is PIXELS_PER_SIDE long. ...
Jan Diederich's user avatar
1 vote
1 answer
78 views

Im doing a Actix Web rust backend with SeaORM, I finished and it works fine, so I'm doing some tests, SeaORM has a mock feature, which you can enable in the Cargo.toml file, but enabling it makes the ...
Wilmer Umaña's user avatar
0 votes
0 answers
92 views

I am trying to run a Rust application compiled to WASM inside Docker using the WasmEdge runtime. I have enabled the "Use containerd for pulling and storing images" and "Enable Wasm"...
Eric's user avatar
  • 1
-5 votes
0 answers
76 views

Can anyone teach me what is the issue in the following code lines. This is tapp exchange migration script in move smart contract. let data = vector::empty<u8>(); // pool id (32 bytes) vector::...
Seiji Ito's user avatar
Best practices
0 votes
1 replies
86 views

I have a vector of key-value pairs, where keys can be duplicate, or rather, I have an iterator that I eventually collect to that vector. I need to get a HashMap with those keys, but vectors of values ...
Ibolit's user avatar
  • 9,790
0 votes
0 answers
77 views

Dioxus components can add EventHandlers on predefined Node attributes eg: fn app() -> Element { let mut moveCount = use_signal(|| 0); rsx! { h1 { "Mouse mouvement counter: {...
KrapocK's user avatar
  • 56
1 vote
1 answer
95 views

I'm writing a simple REPL for a language with rustyline, and I'm trying to support multiline input using ^J. How do I get rustyline to display a read-only continuation prompt while inserting a ...
quintuple-mallard's user avatar
1 vote
1 answer
97 views

We have a boxed slice of an arbitrary type T. I'd like to slice it at a given index, then move the remaining elements after the index into a new Box<[T]>. It's fine if the original Box<[T]>...
Levente Bokor's user avatar

15 30 50 per page
1
2 3 4 5
2928