I'm quite new to rust and actix, but I tried to build a technology prototype where a server sends protobuf messages to clients via websockets. The protobuf part
I have invoked a function from my frontend to my backend. It works however I want to return results back to frontend and all I get is null #[tauri::command] fn
I have the following rust code and for the life of me I cant workout why I am getting a borrow-checker issue with this value and why does it get moved as part o
I have a file, say myfile. Using Rust, I would like to open myfile, and read bytes N to M into a Vec, say myvec. What is the most idiomatic way to do so? Naivel
See some code below: #[derive(Debug)] struct MyString { a: String, } impl MyString { fn new(s: &str) -> Self { MyString { a: String::fro
I know about how to run programs at startup on Windows, but not Linux (even though I use Linux myself). Is there a library I can use which will automatically ru
I am working on a mixed Rust/Python project being build with maturin. I am having trouble figuring out how I can specify a pre-release version that can than be
I have a vector of tuples, each containing two strings. I want to transfer (one of) the two strings as a mutable reference into a hashmap. The other string is a
I'm trying to figure out how to use native Rust modules in NodeJS using the Neon crate. To get started I was following an example using RefCell to make it possi
I have a string or a &str of ASCII characters and I want to separate it into a Vec of all substrings with contiguous identical characters (for example, "aab
I am using the Rust extension on vscode and NOT rust-analyzer. However, when I am saving a file, vscode is using rustfmt to format my file but it doesn't automa
What typical scenario would traits be used for in a Rust program? I have tried to wrap my head around them, but I still don't have a clear con
I'm trying to interact with a low-level C API using Rust. It requires calling to get the size of an array, then calling again with an allocated array of structs
The following code (playground) let max_column = 7; edge = match current_column { 0 => Edge::Left, max_column => Edge::Right, _ => Edge::N
Suppose I have a contract ... pub struct Contract { collection_a: Vector<String>, } After I deploy this version, when I change the data structure of my
I am new to blockchain and Near Protocol. I have created 2 smart contracts on Near Protocol. The first one was successfully done but when I try to deploy the se
I have incoming data in a json array that I deserialize into a struct, but I can't seem figure out how to serialize it back into an array instead of an object.
I am coming from looking at Rust and How do I detect unsigned integer multiply overflow? where in Rust they have checked_add, which is implemented like this: pu
An API with this internally tagged field structure, with "topic" being the tag: { "topic": "Car" "name": "BMW" "HP": 250 } This can be deserialized
The solution provided in question 38553513 does not work for me. Consider these types and functions: pub enum Parameter { ParameterTypeA { n: i32 }, Par