pub struct NodeOutput {
pub port: String,
pub data: RelPtr<()>,
pub schema_hash: u64,
pub error_message: Option<String>,
}Expand description
Output from a node execution.
Fields§
§port: StringThe output port that was activated.
data: RelPtr<()>Pointer to the output data in the arena.
schema_hash: u64Schema hash of the output data.
error_message: Option<String>Optional error message (for error outputs without arena data).
Implementations§
Source§impl NodeOutput
impl NodeOutput
Sourcepub fn error_with_message(message: impl Into<String>) -> Self
pub fn error_with_message(message: impl Into<String>) -> Self
Create output on the “error” port with a message string.
Use this when you have an error message but no arena data to write. The error message will be available for logging and debugging.
Sourcepub fn on_true<T>(data: RelPtr<T>) -> Self
pub fn on_true<T>(data: RelPtr<T>) -> Self
Create output on the “true” port (for switch nodes).
Sourcepub fn on_false<T>(data: RelPtr<T>) -> Self
pub fn on_false<T>(data: RelPtr<T>) -> Self
Create output on the “false” port (for switch nodes).
Sourcepub fn with_schema_hash(self, hash: u64) -> Self
pub fn with_schema_hash(self, hash: u64) -> Self
Set the schema hash.
Sourcepub fn has_error_message(&self) -> bool
pub fn has_error_message(&self) -> bool
Check if this output has an error message.
Sourcepub fn get_error_message(&self) -> Option<&str>
pub fn get_error_message(&self) -> Option<&str>
Get the error message, if any.
Sourcepub fn arena_location(&self) -> (ArenaOffset, u32)
pub fn arena_location(&self) -> (ArenaOffset, u32)
Get the arena location (offset and size) of the output data.
Returns (offset, size) tuple for use in WAL records and crash recovery.
Returns (ArenaOffset::NULL, 0) if the data pointer is null.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NodeOutput
impl RefUnwindSafe for NodeOutput
impl Send for NodeOutput
impl Sync for NodeOutput
impl Unpin for NodeOutput
impl UnwindSafe for NodeOutput
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
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> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.