I am developing an API with Rust, using Rocket as main framework. To create the Swagger docs I use Okapi, which allows me to create the docs automatically. use
I am trying to #[derive(Deserialize, Serialize)] some structs that involve other custom structs, so I can transform them in and out of JSON, for example: #[deri
I try to call my function just like the example code: use std::arch::asm; extern "C" fn foo(arg: i32) -> i32 { println!("arg = {}", arg); arg * 2 }
The following code compiles fine: struct StructA<F>(F); impl<F, T> StructA<F> where F: Fn() -> T {} Although T doesn't show up in StructA'
use anchor_lang::prelude::*; declare_id!("Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS"); #[program] pub mod myepicproject { use super::*; pub fn start_st
I have a dll that i want to call from Progress code but I can't complete. I have tried with Visual Studio 2022, Windows C++ Dll and Rust Dll. Windows C++, Visua
I've created a server using Actix Web which has authentication support. Now I want to add an OpenAPI Specification using paperclip. Normally you only have to ad
I am learning how to write a http server using tcpstream with rust. I use this function to read stream buffer. fn handle_connection(mut stream: TcpStream) {
I have downloaded the GTK4 demo from Github and placed it in a directory. I have opened it in VC and attempt to run the demo according to the Read.ME. I get t
Let's say you have a structure that you want to be a generic over time type T, so long as that type implements some trait R. That's pretty trivial: trait R {
I have some trouble to correctly understand lifetime concept in Rust. Especially in reference to structure's object itself and structure's member. Following min
Is it possible to explicitly mark a type with unimplemented Send or Sync marker traits without some redundant fields? This can be an alternative: struct T {
I'm using the LLDB extension for VSCode, and my variables typed as i8 are printed as characters. Both in the VSCode debugging panel, and when using print in the
I'm new to rust, so forgive me if the question is naive. I'm trying to build an OS in rust and I'm following this tutorial. The OS doesn't have memory managemen
Can anyone help me understand why this code compiles fine: use actix_web::{App, HttpServer}; use anyhow::Result; mod error; #[actix_rt::main] async fn main()
I am pretty new in Rust and trying to build a web application with https://docs.rs/warp/0.2.3/warp/index.html. I have tried: #[tokio::main] async fn main()
I'm trying to get user input and check if the user put in "y" or "n". Surprisingly, in the below code, neither the if nor the if else case executes! Apparently,
In thrussh's documentation they have server and client example code. Code based on the example server code has been working fine in various projects. However,
I am running a Rust warp webserver and I need more descriptive error messages. I'd like to print a backtrace or something similar so I can tell where the error
I have a cargo workspace with one library "./raytracing" and one binary "./cli". The two workspace members have different dependencies. ./raytracing/Cargo.toml: