pub struct NewDocument<'a> {Show 14 fields
pub source_version_id: Uuid,
pub node_id: Uuid,
pub kind: DocumentKind,
pub source_url: Option<&'a str>,
pub published_url: Option<&'a str>,
pub source_path: &'a str,
pub language: Option<&'a str>,
pub content_hash: &'a str,
pub source_modified_at: Option<OffsetDateTime>,
pub frontmatter: Option<Value>,
pub provenance: &'a Provenance,
pub package_id: Option<Uuid>,
pub char_count: i32,
pub token_count: i32,
}Expand description
Parameters for inserting a new document — grouped to keep call sites readable since the table has many columns.
Fields§
§source_version_id: UuidOwning source_version.
node_id: UuidOwning node (kind = document).
kind: DocumentKindDocument kind discriminator.
source_url: Option<&'a str>Public source URL (optional).
published_url: Option<&'a str>Public published URL (optional).
source_path: &'a strRepo-relative source path.
language: Option<&'a str>ISO language tag, if known.
content_hash: &'a strSHA-256 of normalized content.
source_modified_at: Option<OffsetDateTime>Last-modified timestamp from the source.
frontmatter: Option<Value>Verbatim frontmatter JSON.
provenance: &'a ProvenanceMaterialized provenance.
package_id: Option<Uuid>Package this document belongs to, if any.
char_count: i32Character count of the source content.
token_count: i32Token count by the embedding tokenizer.
Trait Implementations§
Source§impl<'a> Clone for NewDocument<'a>
impl<'a> Clone for NewDocument<'a>
Source§fn clone(&self) -> NewDocument<'a>
fn clone(&self) -> NewDocument<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for NewDocument<'a>
impl<'a> RefUnwindSafe for NewDocument<'a>
impl<'a> Send for NewDocument<'a>
impl<'a> Sync for NewDocument<'a>
impl<'a> Unpin for NewDocument<'a>
impl<'a> UnsafeUnpin for NewDocument<'a>
impl<'a> UnwindSafe for NewDocument<'a>
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> 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>
Converts
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>
Converts
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