Note that you don't have to guess or make any assumptions. The source code of the Rust standard library is freely available right from the official documentation site, so you can just read it.
Hello and thanks a lot for your help, you've really thrown light on it.
So, continuing my thoughts in the above discussion the following drawing should depict the memory layout of the following code take from the Book (Listing 15-18: A definition of List that uses Rc)
enum List {
Cons(i32, Rc<List>),
Nil,
}
use crate::List::{Cons, Nil};
use std::rc::Rc;
fn main() {
let a = Rc::new(Cons(5, Rc::new(Cons(10, Rc::new(Nil)))));
let b = Cons(3, Rc::clone(&a));
let c = Cons(4, Rc::clone(&a));
}
The exact order of the ptr, len, cap fields of a vector could be different than what you used (the order is not guaranteed and may change from one compile to another). But otherwise yes.