Ah, taking inspiration from late 1940's literature, I see. Smart!
Ogeon
Simple features are often complex to make, and complex features are often way too simple to make.
I assumed the handles are for chairs that are overly heavy and hard to grip.
That's nice to hear! And the Ok*
color spaces are indeed quite neat
ICC profiles are definitely part of the field, but that's sort of a topic of its own. At least in terms of scope. The color space rabbit hole is so deep that I never got as far as including them. There are other crates that go into those parts and it should be easy to bridge between them and Palette.
I would say Palette is more for the "business logic" of working with colors, so converting, manipulating and analyzing. The difference from ICC profiles when converting with Palette is that you need to know more about the source and destination color spaces during compile time. ICC profiles use more runtime information.
Palette could be used for applications like image manipulation programs, 3D rendering, generative art, UI color theme generation, computer vision, and a lot more. A lot of people also use it for smaller tasks like converting HSL input to RGB output or making gradients.
It's useful for keeping track of your mental gymnastics.
I don't know, something about seeing the same diarrhea pills ad over and over doesn't exactly spark joy for me.
It may be possible to use the Any
trait to "launder" the value by first casting it to &Any
and then downcasting it to the generic type.
let any_value = match tmp_value {
serde_json::Value::Number(x) => x as &Any,
// ...
};
let maybe_value = any_value.downcast_ref::< T >();
I haven't tested it, so I may have missed something.
Edit: to be clear, this will not actually let you return multiple types, but let the caller decide which type to expect. I assumed this was your goal.
My shower has its own favorite temperature and will slowly readjust itself to it.
I considered the smaller one at first, but decided to take the larger one and use the compression straps to keep it tight when packing a smaller volume. It doesn't feel as bulky as I thought it would at first.
Got myself a proper hiking backpack. An Osprey Exos 58L. Shifting much of the weight to the hips makes a massive difference and my back was very happy!
A "mantra" more programmers should have is to fix the cause of the issue, and not just the symptoms. You have to understand what the problem is to be able to fix it.