pub struct FcallResult {
pub success: bool,
pub status: String,
pub fields: Vec<Value>,
}Expand description
Parsed FCALL result from a FlowFabric Lua function.
Fields§
§success: bool1 = success, 0 = failure.
status: StringStatus string: “OK”, “ALREADY_SATISFIED”, “DUPLICATE”, or error code.
fields: Vec<Value>Remaining fields after status code and status string.
Implementations§
Source§impl FcallResult
impl FcallResult
Sourcepub fn parse(raw: &Value) -> Result<Self, ScriptError>
pub fn parse(raw: &Value) -> Result<Self, ScriptError>
Parse a raw Value returned by FCALL into a structured result.
Sourcepub fn into_success(self) -> Result<Self, ScriptError>
pub fn into_success(self) -> Result<Self, ScriptError>
If this is a failure result, convert the status string to a ScriptError. Returns Ok(self) if success.
For variants carrying a detail payload (e.g. CapabilityMismatch,
InvalidCapabilities, InvalidInput) the first Lua-return field
is folded into the variant so callers can log the specifics of WHY
the call failed (which caps were missing, which bound was violated)
instead of an empty String placeholder.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FcallResult
impl !RefUnwindSafe for FcallResult
impl Send for FcallResult
impl Sync for FcallResult
impl Unpin for FcallResult
impl UnsafeUnpin for FcallResult
impl !UnwindSafe for FcallResult
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