What is the Difference between asssigning layer and assigning weight of layer?

i have two code example:

model.embedding = new_emb

and

model.shared.weight = new_emb.weight

What would be the difference between those two?

Thanks.