Meaning of curly brackets in $x\mapsto \{x\}$ vs. $x\mapsto x$? I have the following:

The mapping $f: A \rightarrow B$ is defined by $x\mapsto \{x\}$.

I understand the meaning of the notation $f:A \rightarrow B$. For instance, if the sets are $A=\mathbb R$ and $B=\mathbb R$, we can have the function $ f:\mathbb R \rightarrow \mathbb R$, defined by $x\mapsto f(x)=x$. So if $x=4$ we have $f(4)=4$, etc.
But what is the meaning of the curly brackets around $x$? I.e. what is the difference between
$$
f: A \rightarrow B, \quad x\mapsto \{x\} \tag 1
$$
and
$$
f: A \rightarrow B, \quad x\mapsto x \tag 2
$$
?
Update:
The notation $\{x\}$ is from the proof of Cantor's theorem. Here the co-domain is the power set. I'm not interested in this specific proof, so I tried to simplify my question because I'm just stuck at $\{x\}$. Does my question still make sense if the co-domain isn't a power set?
 A: In the linked set-theoretic context, the meaning is that $\{x\}$ is the singleton of $x$, a set of which $x$ is the only member.
A: 
Perhaps you are confused with the notation for a single element set?  If a set contains four elements, $a,b,c,d$, we notate the set as: $\{a,b,c,d\}$.  If a set contains three elements $b,c,d$, we notate the set as: $\{b,c,d\}$.  If a set contains two elements, $c,d$, we notate the set as: $\{c,d\}$.  And if a set contains one element, $d$, then we notate the set as: $\{d\}$.  That's all.  (BTW, a set with no elements is often written as $\{\}$; but most people find $\emptyset$ easier to read.)

.....
$f:A\to B$ so that $f(x) = \{x\}$ means it takes the object $x$ as input and outputs a set; $\{x\}$.
There's nothing weird or mysterious about this.
But it does require that if $W = \{\Omega \in \mathscr P(A): |\Omega| = 1\} = \{\{x\}: x \in A\} =\{$ subsets of $A$ with exactly on element$\}$, then $W \subset B$.
If $W \not \subset B$ then that makes no sense and is not possible.  It is impossible for the same reason $f: \mathbb N \to \mathbb N$, $f(n) = \sqrt n$ is impossible, or $f: \mathbb R \to \{elephants\}$, $f(x)=\sqrt x$ is impossible, or that $f:\{$people in Arizona$\}\to \{$Italian dishes$\}$, $f(x)= x$'s favorite meal, is impossible.  [because the square root of every natural number aren't in the codomain of natural numbers; because the square root of a real number is not an elephant so is not in the codomain of a elephants, and there are people in Arizona whose favorite meal need not be Italian.]
presumably, in this case, and you confirm it in your update,  $B = \mathscr P(A)$.
In which case $f:A \to \mathscr P(A)$ via $f(x) = \{x\}$ makes perfect sense:  $f$ is the function that takes an element of $A$ and returns the set containing precisely that element.
A: It is often used as the notation for "fractional part", i.e.
$$ \{x\} = x - \lfloor x \rfloor $$
Check to see if this is not the convention defined previously in the notes or other material you are reading.
Added (in view of edit to Question, adding context):  In the Wikipedia article discussing Cantor's Thm., the curly braces simply mean "set builder" notation, i.e. $\{ x \}$ is the singleton set containing $x$ and only $x$.
A: "$x \mapsto $x" is just the identity map - it takes $x$ to $x$.
"$x \mapsto ${x}" takes $x$ to a set with only one element, that element being $x$.
In response to your update: It would not make sense in general -- the co-domain has to be a set whose elements are sets (which is the case for the power set).
Are you comfortable with sets like that? They can be confusing when you first meet them. For example, are $\{5,6\}$ and $\{\{5,6\}\}$ the same set? (Answer: No.) How many elements do they have? (Answer: 2 and 1, respectively.)
