Struct llm_chain::serialization::Envelope
source · pub struct Envelope<T> {
pub metadata: HashMap<String, String>,
pub data: T,
}
Fields§
§metadata: HashMap<String, String>
§data: T
Implementations§
source§impl<T> Envelope<T>where
T: Serialize + DeserializeOwned,
impl<T> Envelope<T>where T: Serialize + DeserializeOwned,
pub fn read_file_sync(path: &str) -> Result<Self, EnvelopeError>
pub fn write_file_sync(&self, path: &str) -> Result<(), EnvelopeError>
Trait Implementations§
source§impl<'de, T: Serialize + Deserialize<'de>> Deserialize<'de> for Envelope<T>
impl<'de, T: Serialize + Deserialize<'de>> Deserialize<'de> for Envelope<T>
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<T> RefUnwindSafe for Envelope<T>where T: RefUnwindSafe,
impl<T> Send for Envelope<T>where T: Send,
impl<T> Sync for Envelope<T>where T: Sync,
impl<T> Unpin for Envelope<T>where T: Unpin,
impl<T> UnwindSafe for Envelope<T>where T: UnwindSafe,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request