pub enum SandboxOutputEvent {
Text {
text: String,
},
Image {
image: String,
},
Error {
error: String,
},
}Expand description
A single streaming output event from code execution.
Events are serialized as NDJSON (newline-delimited JSON) in the HTTP response.
The in-sandbox server at /execute streams these events.
Variants§
Text
Text output (stdout / print statements).
Image
Image output (base64-encoded PNG from matplotlib etc.).
Error
Error output (traceback).
Trait Implementations§
Source§impl Debug for SandboxOutputEvent
impl Debug for SandboxOutputEvent
Source§impl<'de> Deserialize<'de> for SandboxOutputEvent
impl<'de> Deserialize<'de> for SandboxOutputEvent
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SandboxOutputEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SandboxOutputEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for SandboxOutputEvent
impl Serialize for SandboxOutputEvent
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for SandboxOutputEvent
impl RefUnwindSafe for SandboxOutputEvent
impl Send for SandboxOutputEvent
impl Sync for SandboxOutputEvent
impl Unpin for SandboxOutputEvent
impl UnsafeUnpin for SandboxOutputEvent
impl UnwindSafe for SandboxOutputEvent
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more