Skip to main content

RuntimeInput

Struct RuntimeInput 

Source
pub struct RuntimeInput { /* private fields */ }
Expand description

Runtime input admitted after validation.

Runtime input is a separate byte domain from program source. It may contain ASCII whitespace, control bytes, and reserved syntax bytes, but it cannot contain non-ASCII bytes. This value owns validated bytes only; execution budgets are admitted later by RunSeed. Reusing equivalent bytes for another run means validating another RuntimeInputSource, not cloning a previously admitted execution state.

Implementations§

Source§

impl RuntimeInput

Source

pub fn validate( input: RuntimeInputSource<'_>, limits: RuntimeInputLimits, ) -> Result<Self, RuntimeInputError>

Validates a runtime input source for one run.

Runtime input accepts all ASCII bytes, including bytes that would be reserved syntax in program source. Non-ASCII bytes are rejected with a structured input column before execution starts. Owned storage is reserved only after the full validation pass succeeds, so RuntimeInputLimits bounds raw input classification before allocation grows runtime-domain bytes.

§Errors

Returns RuntimeInputError if the input exceeds limits, if any input byte is non-ASCII, if its one-based column cannot be represented, or if owned storage cannot be allocated.

Source

pub fn byte_count(&self) -> RuntimeInputByteCount

Runtime input length in bytes.

Source

pub fn is_empty(&self) -> bool

Returns whether this runtime input contains no bytes.

Trait Implementations§

Source§

impl Debug for RuntimeInput

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for RuntimeInput

Source§

fn eq(&self, other: &RuntimeInput) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for RuntimeInput

Source§

impl StructuralPartialEq for RuntimeInput

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.