pub struct SerializedSymbolTable(/* private fields */);Expand description
A symbol table in JSON transport format.
This is the boundary type between template scope (always Posix paths) and
session scope (host-native paths). The session deserializes it with
PathFormat::host(), ensuring path separators match the worker OS.
This mirrors the real-world flow where a scheduler serializes the symbol table to JSON and sends it to a worker that may be on a different OS.
Implementations§
Source§impl SerializedSymbolTable
impl SerializedSymbolTable
Sourcepub fn from_value(v: Value) -> Self
pub fn from_value(v: Value) -> Self
Create from a serde_json::Value (already-parsed JSON array).
Sourcepub fn from_json_str(s: &str) -> Result<Self, Error>
pub fn from_json_str(s: &str) -> Result<Self, Error>
Create from a JSON string.
Sourcepub fn from_symtab(st: &SymbolTable) -> Self
pub fn from_symtab(st: &SymbolTable) -> Self
Serialize a SymbolTable into transport format.
Sourcepub fn to_symtab(&self, path_format: PathFormat) -> Result<SymbolTable, String>
pub fn to_symtab(&self, path_format: PathFormat) -> Result<SymbolTable, String>
Deserialize to a SymbolTable with the given path format.
Path values in the transport format are plain strings; this method
reconstructs them as ExprValue::Path with separators normalized
to the specified format.
Returns an error if the transport array holds more than
MAX_SYMBOL_TABLE_ENTRIES entries.
Trait Implementations§
Source§impl Clone for SerializedSymbolTable
impl Clone for SerializedSymbolTable
Source§fn clone(&self) -> SerializedSymbolTable
fn clone(&self) -> SerializedSymbolTable
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SerializedSymbolTable
impl Debug for SerializedSymbolTable
Source§impl<'de> Deserialize<'de> for SerializedSymbolTable
impl<'de> Deserialize<'de> for SerializedSymbolTable
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Auto Trait Implementations§
impl Freeze for SerializedSymbolTable
impl RefUnwindSafe for SerializedSymbolTable
impl Send for SerializedSymbolTable
impl Sync for SerializedSymbolTable
impl Unpin for SerializedSymbolTable
impl UnsafeUnpin for SerializedSymbolTable
impl UnwindSafe for SerializedSymbolTable
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<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