but this does not compile through I have to admit that I just guessed the impl part. I do not realy understand if The lifetime or the traits have to go in the <> befor or after the struct name. Also do I also have to add this to the Result?
The second part is that you need to put a lifetime constraint on T to make sure that it lives at least as long as the reference &'a T that points to it. (The compiler actually tells you about this is a very clear manner.)
The third point is the following: As it stands, your method new takes object by value.
That means that at the end of new, object gets destroyed. Taking a reference to a value that will get destroyed immediately can't work out.
That means you have to pass object by reference and make sure that it lives at least as long as the reference you want to take:
Note that in this example, I used shared references to object. If you want to use a mutable, i.e. exclusive reference, you have to replace &'a with &'a mut.