#[non_exhaustive]pub struct FunctionResponsePart {
pub data: Option<Data>,
/* private fields */
}data-foundry-service or evaluation-service or gen-ai-cache-service or gen-ai-tuning-service or llm-utility-service or prediction-service or session-service or vertex-rag-service only.Expand description
A datatype containing media that is part of a FunctionResponse message.
A FunctionResponsePart consists of data which has an associated datatype. A
FunctionResponsePart can only contain one of the accepted types in
FunctionResponsePart.data.
A FunctionResponsePart must have a fixed IANA MIME type identifying the
type and subtype of the media if the inline_data field is filled with raw
bytes.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.data: Option<Data>The data of the function response part.
Implementations§
Source§impl FunctionResponsePart
impl FunctionResponsePart
Sourcepub fn set_data<T: Into<Option<Data>>>(self, v: T) -> Self
pub fn set_data<T: Into<Option<Data>>>(self, v: T) -> Self
Sets the value of data.
Note that all the setters affecting data are mutually
exclusive.
§Example
use google_cloud_aiplatform_v1::model::FunctionResponseBlob;
let x = FunctionResponsePart::new().set_data(Some(
google_cloud_aiplatform_v1::model::function_response_part::Data::InlineData(FunctionResponseBlob::default().into())));Sourcepub fn inline_data(&self) -> Option<&Box<FunctionResponseBlob>>
pub fn inline_data(&self) -> Option<&Box<FunctionResponseBlob>>
The value of data
if it holds a InlineData, None if the field is not set or
holds a different branch.
Sourcepub fn set_inline_data<T: Into<Box<FunctionResponseBlob>>>(self, v: T) -> Self
pub fn set_inline_data<T: Into<Box<FunctionResponseBlob>>>(self, v: T) -> Self
Sets the value of data
to hold a InlineData.
Note that all the setters affecting data are
mutually exclusive.
§Example
use google_cloud_aiplatform_v1::model::FunctionResponseBlob;
let x = FunctionResponsePart::new().set_inline_data(FunctionResponseBlob::default()/* use setters */);
assert!(x.inline_data().is_some());
assert!(x.file_data().is_none());Sourcepub fn file_data(&self) -> Option<&Box<FunctionResponseFileData>>
pub fn file_data(&self) -> Option<&Box<FunctionResponseFileData>>
The value of data
if it holds a FileData, None if the field is not set or
holds a different branch.
Sourcepub fn set_file_data<T: Into<Box<FunctionResponseFileData>>>(self, v: T) -> Self
pub fn set_file_data<T: Into<Box<FunctionResponseFileData>>>(self, v: T) -> Self
Sets the value of data
to hold a FileData.
Note that all the setters affecting data are
mutually exclusive.
§Example
use google_cloud_aiplatform_v1::model::FunctionResponseFileData;
let x = FunctionResponsePart::new().set_file_data(FunctionResponseFileData::default()/* use setters */);
assert!(x.file_data().is_some());
assert!(x.inline_data().is_none());Trait Implementations§
Source§impl Clone for FunctionResponsePart
impl Clone for FunctionResponsePart
Source§fn clone(&self) -> FunctionResponsePart
fn clone(&self) -> FunctionResponsePart
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FunctionResponsePart
impl Debug for FunctionResponsePart
Source§impl Default for FunctionResponsePart
impl Default for FunctionResponsePart
Source§fn default() -> FunctionResponsePart
fn default() -> FunctionResponsePart
Source§impl Message for FunctionResponsePart
impl Message for FunctionResponsePart
Source§impl PartialEq for FunctionResponsePart
impl PartialEq for FunctionResponsePart
impl StructuralPartialEq for FunctionResponsePart
Auto Trait Implementations§
impl Freeze for FunctionResponsePart
impl RefUnwindSafe for FunctionResponsePart
impl Send for FunctionResponsePart
impl Sync for FunctionResponsePart
impl Unpin for FunctionResponsePart
impl UnsafeUnpin for FunctionResponsePart
impl UnwindSafe for FunctionResponsePart
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request