pub struct BoxedOutput { /* private fields */ }Expand description
A boxed cell output that can be stored generically.
Implementations§
Source§impl BoxedOutput
impl BoxedOutput
Sourcepub fn new<T: CellOutput>(value: &T) -> Result<Self>
pub fn new<T: CellOutput>(value: &T) -> Result<Self>
Create a new boxed output from a CellOutput.
Sourcepub fn from_raw_bytes(bytes: Vec<u8>) -> Self
pub fn from_raw_bytes(bytes: Vec<u8>) -> Self
Create a boxed output from raw serialized bytes.
Used when loading outputs from FFI calls where type info is not available at the Rust level.
Note: Type hash is set to 0 (unknown type). This is safe because deserialization validates types at runtime. Full type propagation from FFI would require codegen changes to embed type metadata in dylibs.
Sourcepub fn from_raw_bytes_with_display(bytes: Vec<u8>, display: String) -> Self
pub fn from_raw_bytes_with_display(bytes: Vec<u8>, display: String) -> Self
Create a boxed output from raw bytes with display text.
Used when loading outputs from FFI calls that include a human-readable representation.
Sourcepub fn from_raw_with_type(
bytes: Vec<u8>,
type_hash: u64,
type_name: String,
) -> Self
pub fn from_raw_with_type( bytes: Vec<u8>, type_hash: u64, type_name: String, ) -> Self
Create a boxed output from raw bytes with known type info.
Used when restoring outputs from Salsa cache where type information was preserved.
Sourcepub fn display_text(&self) -> Option<&str>
pub fn display_text(&self) -> Option<&str>
Get the display text (Debug format) if available.
Sourcepub fn deserialize<T>(&self) -> Result<T>
pub fn deserialize<T>(&self) -> Result<T>
Deserialize to a specific type.
Returns an error if the type hash doesn’t match.
Trait Implementations§
Source§impl Archive for BoxedOutput
impl Archive for BoxedOutput
Source§const COPY_OPTIMIZATION: CopyOptimization<Self>
const COPY_OPTIMIZATION: CopyOptimization<Self>
serialize. Read moreSource§impl Clone for BoxedOutput
impl Clone for BoxedOutput
Source§fn clone(&self) -> BoxedOutput
fn clone(&self) -> BoxedOutput
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BoxedOutput
impl Debug for BoxedOutput
Source§impl<__D: Fallible + ?Sized> Deserialize<BoxedOutput, __D> for Archived<BoxedOutput>where
Vec<u8>: Archive,
<Vec<u8> as Archive>::Archived: Deserialize<Vec<u8>, __D>,
u64: Archive,
<u64 as Archive>::Archived: Deserialize<u64, __D>,
String: Archive,
<String as Archive>::Archived: Deserialize<String, __D>,
Option<String>: Archive,
<Option<String> as Archive>::Archived: Deserialize<Option<String>, __D>,
impl<__D: Fallible + ?Sized> Deserialize<BoxedOutput, __D> for Archived<BoxedOutput>where
Vec<u8>: Archive,
<Vec<u8> as Archive>::Archived: Deserialize<Vec<u8>, __D>,
u64: Archive,
<u64 as Archive>::Archived: Deserialize<u64, __D>,
String: Archive,
<String as Archive>::Archived: Deserialize<String, __D>,
Option<String>: Archive,
<Option<String> as Archive>::Archived: Deserialize<Option<String>, __D>,
Source§fn deserialize(
&self,
deserializer: &mut __D,
) -> Result<BoxedOutput, <__D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut __D, ) -> Result<BoxedOutput, <__D as Fallible>::Error>
Auto Trait Implementations§
impl Freeze for BoxedOutput
impl RefUnwindSafe for BoxedOutput
impl Send for BoxedOutput
impl Sync for BoxedOutput
impl Unpin for BoxedOutput
impl UnwindSafe for BoxedOutput
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> ArchiveUnsized for Twhere
T: Archive,
impl<T> ArchiveUnsized for Twhere
T: Archive,
Source§type Archived = <T as Archive>::Archived
type Archived = <T as Archive>::Archived
Archive, it may be
unsized. Read moreSource§fn archived_metadata(
&self,
) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
fn archived_metadata( &self, ) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
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> CellOutput for Twhere
T: for<'a> Serialize<Strategy<Serializer<AlignedVec, ArenaHandle<'a>, Share>, Error>> + Send + Sync + 'static,
impl<T> CellOutput for Twhere
T: for<'a> Serialize<Strategy<Serializer<AlignedVec, ArenaHandle<'a>, Share>, Error>> + Send + Sync + 'static,
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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 moreSource§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.