krag on Nostr: How to properly use the error propagation (?) in rustlang? When there are multiple ...
How to properly use the error propagation (?) in rustlang?
When there are multiple '?' in a function, that return different types of errors, what should be the error type of function's result?
I have only used C language until now.
#rustlang
Published at
2024-01-04 20:45:11Event JSON
{
"id": "1358550cfa9a06dc2a15a3656f02ea8ebe80e9c11098d8be00e96398a0d873f2",
"pubkey": "8da45d142eee2334e668ae0c6c5b34c57350eb0eb06a436c44e8d3a4f207c781",
"created_at": 1704401111,
"kind": 1,
"tags": [
[
"t",
"rustlang"
],
[
"proxy",
"https://fosstodon.org/users/krag/statuses/111699631271409384",
"activitypub"
]
],
"content": "How to properly use the error propagation (?) in rustlang?\nWhen there are multiple '?' in a function, that return different types of errors, what should be the error type of function's result?\n\nI have only used C language until now.\n\n#rustlang",
"sig": "6f0394ec408fc34685205b9e1795cc7a0458b9b6f81cc4f8bf203aacb876d668c47663e87e1cc3299790252726b31feb8859568239081dbf81b70608d5233b19"
}