pub enum EmittedFieldType {
Int,
Float,
Bool,
Unit,
String,
ListInt,
}Expand description
Erased canonical type tag the build.rs binding generator uses to
pick the Rust type for each #main parameter / return slot.
Phase 2 covers Int / Bool / String / internal unit slots. Float, Lists,
nested schemas, and closure-valued returns surface as
UnsupportedSignature at emit-object time so the binding never
sees a type tag it can’t handle.
§Three-crate triple contract
This tag is the byte-for-byte-identical seam shared by three crates; the enum is mirrored (not shared) so the runtime shim and build generator don’t take a dep on this codegen crate:
relon_codegen_llvm(this enum) — produced by [lower_field_descriptors].relon_rs_shims::EmittedFieldType— the runtime mirror;call_buffer_entrypacks/unpacks per variant.relon_rs_build—rust_type_formaps each variant to the Rust surface type +ArgValue/RetValueconstructor.
Adding a variant is a four-touch change: (1) add the variant
here + its arm in [lower_field_descriptors]; (2) add the mirror
variant + the *_in / *_out sibling helpers in
relon_rs_shims::marshal; (3) add the rust_type_for table row in
relon_rs_build; (4) extend the cross-crate round-trip guard test.
The guard test in relon-rs-build/tests/marshal_roundtrip.rs fails
closed if any of the three drift.
Variants§
Int
i64. Inline slot at offset, 8/8.
Float
f64. Inline slot at offset, 8/8 (8 LE bytes, IEEE-754).
Bool
bool. Inline slot at offset, 1/1.
Unit
(). Inline slot at offset, 1/1 (always reads as zero).
String
&str / String. Pointer-indirect: fixed slot is a 4-byte
buffer-relative offset to a [len: u32 LE][utf8 bytes] tail
record. Build.rs uses BufferBuilder::write_string to pack
inputs and BufferReader::read_string to decode outputs.
ListInt
&[i64] / Vec<i64>. Pointer-indirect (like String): the
fixed slot is a 4-byte buffer-relative offset to a
[len: u32 LE][pad to 8][i64 LE …] tail record (8/8-inline
elements, byte-identical to the ConstPool add_list_int blob).
Build.rs uses BufferBuilder::write_list_int to pack inputs and
BufferReader::read_list_int to decode outputs.
Trait Implementations§
Source§impl Clone for EmittedFieldType
impl Clone for EmittedFieldType
Source§fn clone(&self) -> EmittedFieldType
fn clone(&self) -> EmittedFieldType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for EmittedFieldType
Source§impl Debug for EmittedFieldType
impl Debug for EmittedFieldType
impl Eq for EmittedFieldType
Source§impl PartialEq for EmittedFieldType
impl PartialEq for EmittedFieldType
Source§fn eq(&self, other: &EmittedFieldType) -> bool
fn eq(&self, other: &EmittedFieldType) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for EmittedFieldType
Auto Trait Implementations§
impl Freeze for EmittedFieldType
impl RefUnwindSafe for EmittedFieldType
impl Send for EmittedFieldType
impl Sync for EmittedFieldType
impl Unpin for EmittedFieldType
impl UnsafeUnpin for EmittedFieldType
impl UnwindSafe for EmittedFieldType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
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>
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