Swordsticks (or in this case sword canes) are real weapons. I’ve got a cheap one around here, somewhere. They’re very specialized, and for their intended use, they work. In the 18th and 19th centuries, these were used as a self defense tool and, probably, a status symbol.
Usually these are canes constructed in two parts. The main shaft is hollow, and attaches to the head via threading or some kind of locking mechanism. The head doubles as a simple hilt, with a blade extending down through the shaft. When separated, the shaft functions as a sheath, though in some cases it can be used as an improvised parrying tool.
The short answer to it’s effectiveness is, it can kill you. It’s a long, thin, sharp blade. Getting run through by one will ruin your day. They’re not a particularly useful weapon for general combat, but that was never their intended purpose.
As with most weapons, swordsticks range from simple, mostly practical designs, to highly ornate display pieces. Depending on the quality of the individual cane, it could be entirely functional, and quite lethal, or not.
The idea behind the swordstick is, as a cultured gentleman, if you were attacked, you could pull the blade and use it to defend yourself. This is roughly equivalent to a modern concealed carry pistol. It’s not a great combat weapon, but if someone’s trying to kill you, it’s better than nothing.
As an emergency self defense tool, they’re functional, and far more lethal than a simple cane. A mugger armed with a cudgel would be able to defend themselves from a cane, but a swordstick would prove much harder to deal with especially when it’s wielder is also a trained fencer. Try to remember that for the 18th and 19th century English gentlemen, fencing was still an expected past time. It’s not just that the gentleman was carrying a sword in his cane, he also, usually, knew how to use it.
For what it’s worth, I’d much rather deal with someone swinging a dogwood cane at me than a lunging with a swordstick. You can deliver a lot of force with a cane, but a swordstick will deliver lethal injuries quickly, and that’s part of it’s purpose. The point of drawing a blade is to tell a would be assailant, “you thought I’d be an easy mark, now I’m going to end you.”