I will try to simplify the problem as much as I can. I want to disable a relation load from a trait on a resource that happens at the retrieved event ...
I will try to simplify the problem as much as I can. I want to disable a relation load from a trait on a resource that happens at the retrieved event ...
Say I need to model some living things. All living things need to do stuff: trait LivingThing { fn do_stuff(&self); } I might have sub-trai ...
My goal is to query the database and find if a user already exists with the giving email. Looking at the documentation, this appears the way to do so. ...
I'm implementing a small service that accepts commands over TCP and relays it to device that also accepts commands over TCP. I wrote the entire thing ...
I have two structs A and B that are exactly similar. I am trying to convert both A and B to another type C. The definitions of A,B and C are given bel ...
I have the following Rust code use std::{ cell::{Ref, RefCell}, rc::Rc, }; trait TraitA { fn data(&self) -> Ref<Vec<Rc<d ...
I have created a generic, monadic type -- call it A<T>. I would like to be able to have this type convert safely between A<T> to A<U> ...
I created a trait to use with a controller. The controller should start the trait function, which validates its input and then does a thing. Inside t ...
I'm trying to compare elements of structs using the assert_approx_eq! macro. The structs I'm working on are I've implemented the IntoIterator trait ...
I want to create a wrapper around (nested) slices for easy operations on multidimensional data, owned by a different struct. The most basic version of ...
The goal is to have an object (callback_handler) implementing the traits A, B and C that can be passed to different functions that expect a trait obje ...
I have a program which interfaces with slightly different hardware. All hardware types support the same features which can be encapsulated in a trait. ...
In a nutshell, I am facing an issue with the following: I am willing to abstract codec implementations from tokio_util::codec. In order to do so, I de ...
I am currently at a loss for how to reconcile a certain design pattern in Rust. This pattern involves a trait with a generic function that is constrai ...
I have this trait: and this controller using the Trait: What I need to return 'edit' on getFormAction method on my Trait? I'm using Laravel. T ...
I'm using actix-web v4. I'm trying to implement a web service with a custom structure for handling errors: pub struct ApiError { pub message: St ...
I am implementing a linked list in Rust, and so far, the best way I have found to let the nodes point to other nodes or point to nothing is multiple s ...
I am pretty new to Rust, and I have a question that seems simple on the surface but I think is much more challenging than I thought (this is just for ...
In trying to compile the code The compiler gives I have been reading through similar questions Parameter type may not live long enough? and The ...
I'm looking to simplify an expression for decoding the opcode for a risc v microcontroller: to somewthing like this: Is this possible, can I add ...