You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there anyway to handle errors while producing an stream? For example in code like the following:
#[rocket::get("/")]asyncfnindex() -> TextStream![String]{//....TextStream!{let result = file.read_to_string(buf);if result.is_ok(){
yield buf
}else{// What to do in case of error? }}}
Is there anyway to detect an error an cancel the stream somehow?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Is there anyway to handle errors while producing an stream? For example in code like the following:
Is there anyway to detect an error an cancel the stream somehow?
Beta Was this translation helpful? Give feedback.
All reactions