#[non_exhaustive]pub struct EmbedContentResponse {
pub embedding: Option<Embedding>,
pub usage_metadata: Option<UsageMetadata>,
pub truncated: bool,
/* private fields */
}Available on crate feature
prediction-service only.Expand description
Response message for PredictionService.EmbedContent.
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.embedding: Option<Embedding>The embedding generated from the input content.
usage_metadata: Option<UsageMetadata>Metadata about the response(s).
truncated: boolWhether the input content was truncated before generating the embedding.
Implementations§
Source§impl EmbedContentResponse
impl EmbedContentResponse
pub fn new() -> Self
Sourcepub fn set_embedding<T>(self, v: T) -> Self
pub fn set_embedding<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_embedding<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_embedding<T>(self, v: Option<T>) -> Self
Sets or clears the value of embedding.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::embed_content_response::Embedding;
let x = EmbedContentResponse::new().set_or_clear_embedding(Some(Embedding::default()/* use setters */));
let x = EmbedContentResponse::new().set_or_clear_embedding(None::<Embedding>);Sourcepub fn set_usage_metadata<T>(self, v: T) -> Selfwhere
T: Into<UsageMetadata>,
pub fn set_usage_metadata<T>(self, v: T) -> Selfwhere
T: Into<UsageMetadata>,
Sets the value of usage_metadata.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::UsageMetadata;
let x = EmbedContentResponse::new().set_usage_metadata(UsageMetadata::default()/* use setters */);Sourcepub fn set_or_clear_usage_metadata<T>(self, v: Option<T>) -> Selfwhere
T: Into<UsageMetadata>,
pub fn set_or_clear_usage_metadata<T>(self, v: Option<T>) -> Selfwhere
T: Into<UsageMetadata>,
Sets or clears the value of usage_metadata.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::UsageMetadata;
let x = EmbedContentResponse::new().set_or_clear_usage_metadata(Some(UsageMetadata::default()/* use setters */));
let x = EmbedContentResponse::new().set_or_clear_usage_metadata(None::<UsageMetadata>);Trait Implementations§
Source§impl Clone for EmbedContentResponse
impl Clone for EmbedContentResponse
Source§fn clone(&self) -> EmbedContentResponse
fn clone(&self) -> EmbedContentResponse
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 EmbedContentResponse
impl Debug for EmbedContentResponse
Source§impl Default for EmbedContentResponse
impl Default for EmbedContentResponse
Source§fn default() -> EmbedContentResponse
fn default() -> EmbedContentResponse
Returns the “default value” for a type. Read more
Source§impl Message for EmbedContentResponse
impl Message for EmbedContentResponse
Source§impl PartialEq for EmbedContentResponse
impl PartialEq for EmbedContentResponse
impl StructuralPartialEq for EmbedContentResponse
Auto Trait Implementations§
impl Freeze for EmbedContentResponse
impl RefUnwindSafe for EmbedContentResponse
impl Send for EmbedContentResponse
impl Sync for EmbedContentResponse
impl Unpin for EmbedContentResponse
impl UnwindSafe for EmbedContentResponse
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