Foone🏳️⚧️ on Nostr: so I need something like: for command in commands.iter(){ if type(command) == Include ...
so I need something like:
for command in commands.iter(){
if type(command) == Include {
//do some stuff here
}
}
but I don't know the syntax for "if this enum is this type" or if this is a remotely reasonable pattern for rust code
Published at
2024-07-14 02:15:18Event JSON
{
"id": "a31668717f5efddaadb7f8a8670b791ceff62de065fa465bcd82ed5b8209f3fb",
"pubkey": "8d0c6793de7edd25b3e6fcfd2e4e9b301cec2c7e577a9dcf0247e64d7c3c737e",
"created_at": 1720923318,
"kind": 1,
"tags": [
[
"e",
"9b0a10c608d5cbde60f6d0b9b0fa568ba907149a33bbc5db61ff84e31094996a",
"wss://relay.mostr.pub",
"reply"
],
[
"proxy",
"https://digipres.club/users/foone/statuses/112782430632661848",
"activitypub"
]
],
"content": "so I need something like:\nfor command in commands.iter(){\n if type(command) == Include {\n //do some stuff here \n }\n}\n\nbut I don't know the syntax for \"if this enum is this type\" or if this is a remotely reasonable pattern for rust code",
"sig": "288613a8f9843d01972210335f1712c0fd10ddacab0072162d3fc2afdf29365a635c450e73e388e46f676dd23c3621657a90b9a063187340946fdc458256993c"
}