sendable

Deprecated alias to boxed.

deprecated
alias sendable = boxed

Examples

{
    auto msg = boxed("asdf");
    auto asCast = cast(Boxed!string)msg;
    assert((msg !is null), "Incorrectly cast message: " ~ typeof(asCast).stringof);
    asCast = null;  // silence dscanner
}
{
    auto msg = boxed(123_456);
    auto asCast = cast(Boxed!int)msg;
    assert((msg !is null), "Incorrectly cast message: " ~ typeof(asCast).stringof);
    asCast = null;  // silence dscanner
}
{
    struct Foo {}
    auto msg = boxed(Foo());
    auto asCast = cast(Boxed!Foo)msg;
    assert((msg !is null), "Incorrectly cast message: " ~ typeof(asCast).stringof);
    asCast = null;  // silence dscanner
}

Meta