pub enum LogMsg {
Stdout(String),
Stderr(String),
JsonPatch(Patch),
SessionId(String),
Finished,
}Variants§
Implementations§
Source§impl LogMsg
impl LogMsg
pub fn name(&self) -> &'static str
pub fn to_sse_event(&self) -> Event
Sourcepub fn to_ws_message(&self) -> Result<Message, Error>
pub fn to_ws_message(&self) -> Result<Message, Error>
Convert LogMsg to WebSocket message with proper error handling
Sourcepub fn to_ws_message_unchecked(&self) -> Message
pub fn to_ws_message_unchecked(&self) -> Message
Convert LogMsg to WebSocket message with fallback error handling
This method mirrors the behavior of the original logmsg_to_ws function but with better error handling than unwrap().
Sourcepub fn approx_bytes(&self) -> usize
pub fn approx_bytes(&self) -> usize
Rough size accounting for your byte‑budgeted history.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LogMsg
impl<'de> Deserialize<'de> for LogMsg
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for LogMsg
impl RefUnwindSafe for LogMsg
impl Send for LogMsg
impl Sync for LogMsg
impl Unpin for LogMsg
impl UnwindSafe for LogMsg
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)