#[non_exhaustive]pub struct DocumentMetadata {
pub uri: String,
pub title: String,
pub struct_data: Option<Struct>,
/* private fields */
}Available on crate features
conversational-search-service or search-service only.Expand description
Document metadata contains the information of the document of the current chunk.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.uri: StringUri of the document.
title: StringTitle of the document.
struct_data: Option<Struct>Data representation.
The structured JSON data for the document. It should conform to the
registered Schema or an
INVALID_ARGUMENT error is thrown.
Implementations§
Source§impl DocumentMetadata
impl DocumentMetadata
pub fn new() -> Self
Sourcepub fn set_struct_data<T>(self, v: T) -> Self
pub fn set_struct_data<T>(self, v: T) -> Self
Sets the value of struct_data.
§Example
ⓘ
use wkt::Struct;
let x = DocumentMetadata::new().set_struct_data(Struct::default()/* use setters */);Sourcepub fn set_or_clear_struct_data<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_struct_data<T>(self, v: Option<T>) -> Self
Sets or clears the value of struct_data.
§Example
ⓘ
use wkt::Struct;
let x = DocumentMetadata::new().set_or_clear_struct_data(Some(Struct::default()/* use setters */));
let x = DocumentMetadata::new().set_or_clear_struct_data(None::<Struct>);Trait Implementations§
Source§impl Clone for DocumentMetadata
impl Clone for DocumentMetadata
Source§fn clone(&self) -> DocumentMetadata
fn clone(&self) -> DocumentMetadata
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DocumentMetadata
impl Debug for DocumentMetadata
Source§impl Default for DocumentMetadata
impl Default for DocumentMetadata
Source§fn default() -> DocumentMetadata
fn default() -> DocumentMetadata
Returns the “default value” for a type. Read more
Source§impl Message for DocumentMetadata
impl Message for DocumentMetadata
Source§impl PartialEq for DocumentMetadata
impl PartialEq for DocumentMetadata
impl StructuralPartialEq for DocumentMetadata
Auto Trait Implementations§
impl Freeze for DocumentMetadata
impl RefUnwindSafe for DocumentMetadata
impl Send for DocumentMetadata
impl Sync for DocumentMetadata
impl Unpin for DocumentMetadata
impl UnwindSafe for DocumentMetadata
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