pub struct WriterError {
pub message: String,
}Expand description
Error returned when sending to a ChatResponseWriter channel fails.
This wraps the underlying channel error to avoid leaking the
tokio::sync::mpsc::error::SendError<T> generic into the public API.
§Example
use agy_bridge::streaming::WriterError;
let err = WriterError::new("receiver dropped");
assert_eq!(err.to_string(), "receiver dropped");Fields§
§message: StringHuman-readable description of the failure.
Implementations§
Trait Implementations§
Source§impl Debug for WriterError
impl Debug for WriterError
Source§impl Display for WriterError
impl Display for WriterError
Source§impl Error for WriterError
impl Error for WriterError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for WriterError
impl RefUnwindSafe for WriterError
impl Send for WriterError
impl Sync for WriterError
impl Unpin for WriterError
impl UnsafeUnpin for WriterError
impl UnwindSafe for WriterError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more