pub enum ChannelEvent {
Status {
format: OutputFormat,
stage: Stage,
progress: f64,
},
Chunk {
content: String,
},
ConversionComplete {
format: OutputFormat,
output_id: String,
},
Error {
reason: String,
},
PasswordRequired,
}Expand description
An event pushed asynchronously over a DocumentChannel, outside of a
direct reply to something we sent.
Variants§
Status
A conversion’s stage or progress changed.
Chunk
A chunk of streamed HTML content. Only sent for the html_stream
format while it’s still converting.
ConversionComplete
A format finished converting.
Error
The server reported an error unrelated to a specific request we made (e.g. a conversion failed after it had already started).
PasswordRequired
The document is password-protected and hasn’t been unlocked yet.
Pushed on join, since a locked document has no outputs and would
otherwise look like a silent channel. Prompt for the password and
pass it to DocumentChannel::start_conversion.
Trait Implementations§
Source§impl Clone for ChannelEvent
impl Clone for ChannelEvent
Source§impl Debug for ChannelEvent
impl Debug for ChannelEvent
Source§impl PartialEq for ChannelEvent
impl PartialEq for ChannelEvent
Source§impl Serialize for ChannelEvent
impl Serialize for ChannelEvent
impl StructuralPartialEq for ChannelEvent
Auto Trait Implementations§
impl Freeze for ChannelEvent
impl RefUnwindSafe for ChannelEvent
impl Send for ChannelEvent
impl Sync for ChannelEvent
impl Unpin for ChannelEvent
impl UnsafeUnpin for ChannelEvent
impl UnwindSafe for ChannelEvent
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