What is the cost of a `with_*()` method?
Hello! I was wondering, if I have a method like:
pub fn with_field(mut self, value: u32) -> Self {
self.field = value;
self
}
would rust always be able to optimize it? or would it sometimes be copied? (assuming we're compiling with optimizations, and the type is sufficiently big, such that copying it is non trivial).