pub struct Document<M = EmptyMetadata>where
M: Serialize + DeserializeOwned,{
pub page_content: String,
pub metadata: Option<M>,
}
Fields§
§page_content: String
§metadata: Option<M>
Implementations§
Trait Implementations§
Source§impl<M> From<&Document<M>> for InMemoryDocument<M>where
M: Serialize + DeserializeOwned,
impl<M> From<&Document<M>> for InMemoryDocument<M>where
M: Serialize + DeserializeOwned,
Source§impl<M> From<&InMemoryDocument<M>> for Document<M>where
M: Serialize + DeserializeOwned,
impl<M> From<&InMemoryDocument<M>> for Document<M>where
M: Serialize + DeserializeOwned,
Source§fn from(val: &InMemoryDocument<M>) -> Self
fn from(val: &InMemoryDocument<M>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<M> Freeze for Document<M>where
M: Freeze,
impl<M> RefUnwindSafe for Document<M>where
M: RefUnwindSafe,
impl<M> Send for Document<M>where
M: Send,
impl<M> Sync for Document<M>where
M: Sync,
impl<M> Unpin for Document<M>where
M: Unpin,
impl<M> UnwindSafe for Document<M>where
M: 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