#[non_exhaustive]pub struct ChunkMetadata {
pub previous_chunks: Vec<Chunk>,
pub next_chunks: Vec<Chunk>,
/* private fields */
}Available on crate features
conversational-search-service or search-service only.Expand description
Metadata of the current chunk. This field is only populated on SearchService.Search API.
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.previous_chunks: Vec<Chunk>The previous chunks of the current chunk. The number is controlled by SearchRequest.ContentSearchSpec.ChunkSpec.num_previous_chunks. This field is only populated on SearchService.Search API.
next_chunks: Vec<Chunk>The next chunks of the current chunk. The number is controlled by SearchRequest.ContentSearchSpec.ChunkSpec.num_next_chunks. This field is only populated on SearchService.Search API.
Implementations§
Source§impl ChunkMetadata
impl ChunkMetadata
pub fn new() -> Self
Sourcepub fn set_previous_chunks<T, V>(self, v: T) -> Self
pub fn set_previous_chunks<T, V>(self, v: T) -> Self
Sets the value of previous_chunks.
§Example
ⓘ
use google_cloud_discoveryengine_v1::model::Chunk;
let x = ChunkMetadata::new()
.set_previous_chunks([
Chunk::default()/* use setters */,
Chunk::default()/* use (different) setters */,
]);Sourcepub fn set_next_chunks<T, V>(self, v: T) -> Self
pub fn set_next_chunks<T, V>(self, v: T) -> Self
Sets the value of next_chunks.
§Example
ⓘ
use google_cloud_discoveryengine_v1::model::Chunk;
let x = ChunkMetadata::new()
.set_next_chunks([
Chunk::default()/* use setters */,
Chunk::default()/* use (different) setters */,
]);Trait Implementations§
Source§impl Clone for ChunkMetadata
impl Clone for ChunkMetadata
Source§fn clone(&self) -> ChunkMetadata
fn clone(&self) -> ChunkMetadata
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 ChunkMetadata
impl Debug for ChunkMetadata
Source§impl Default for ChunkMetadata
impl Default for ChunkMetadata
Source§fn default() -> ChunkMetadata
fn default() -> ChunkMetadata
Returns the “default value” for a type. Read more
Source§impl Message for ChunkMetadata
impl Message for ChunkMetadata
Source§impl PartialEq for ChunkMetadata
impl PartialEq for ChunkMetadata
impl StructuralPartialEq for ChunkMetadata
Auto Trait Implementations§
impl Freeze for ChunkMetadata
impl RefUnwindSafe for ChunkMetadata
impl Send for ChunkMetadata
impl Sync for ChunkMetadata
impl Unpin for ChunkMetadata
impl UnwindSafe for ChunkMetadata
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