{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreiejzrdgo6tk6izxrxb5slkaoeixeovme5gkkvm352s4menw6gzr4y",
"uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mpn557g7vlz2"
},
"path": "/t/traits-for-function-items/22815#post_9",
"publishedAt": "2026-07-02T02:11:20.000Z",
"site": "https://internals.rust-lang.org",
"tags": [
"Implementing traits on function pointers - #2 by steffahn - help - The Rust Programming Language Forum",
"something like this",
"specialization",
"@steffahn"
],
"textContent": "alice:\n\n> convenience holes\n\nSame convenience holes experienced here.\n\nSuggest Implementing traits on function pointers - #2 by steffahn - help - The Rust Programming Language Forum ---> \" A possible workaround, using `unsafe` code, could be to check for a zero-sized and `Copy` type that implements `Fn`. Playing around in a playground got me something like this. This could be used to implement your trait. It seems difficult to _also_ still support function pointers without specialization\" -- thanks to @steffahn.\nI did _not_ digest it fully yet, but it does allow to implement a trait/receiver function on a function _item_ type.",
"title": "Traits for function items"
}