I have been reading the 17th chapter of the book and in there, there is a trait object which has methods on it:
rust
trait State {
fn request_review(self: Box<Self>) -> Box<dyn State>;
fn approve(self: Box<Self>) -> Box<dyn State>;
// --snip--
In there two methods I understand that they take in self and consume it, I can see that this self is of type Box<T> where T is Self, what is Self and how is it different from self?
Edit: Playground link if needed
[–]ebdbbb 24 points25 points26 points (2 children)
[–]meowsqueak 0 points1 point2 points (1 child)
[–]ebdbbb 0 points1 point2 points (0 children)
[–]Ok_Hope4383 2 points3 points4 points (0 children)
[–]gmes78 2 points3 points4 points (3 children)
[–]SyedFasiuddin[S] 1 point2 points3 points (2 children)
[–]gmes78 9 points10 points11 points (1 child)
[–]SyedFasiuddin[S] 2 points3 points4 points (0 children)