#[non_exhaustive]pub struct PartialArg {
pub json_path: String,
pub will_continue: bool,
pub delta: Option<Delta>,
/* 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
Partial argument value of the function call.
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.json_path: StringRequired. A JSON Path (RFC 9535) to the argument being streamed. https://datatracker.ietf.org/doc/html/rfc9535. e.g. “$.foo.bar[0].data”.
will_continue: boolOptional. Whether this is not the last part of the same json_path. If true, another PartialArg message for the current json_path is expected to follow.
delta: Option<Delta>The delta of field value being streamed.
Implementations§
Source§impl PartialArg
impl PartialArg
Sourcepub fn set_json_path<T: Into<String>>(self, v: T) -> Self
pub fn set_json_path<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_will_continue<T: Into<bool>>(self, v: T) -> Self
pub fn set_will_continue<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn null_value(&self) -> Option<&NullValue>
pub fn null_value(&self) -> Option<&NullValue>
The value of delta
if it holds a NullValue, None if the field is not set or
holds a different branch.
Sourcepub fn set_null_value<T: Into<NullValue>>(self, v: T) -> Self
pub fn set_null_value<T: Into<NullValue>>(self, v: T) -> Self
Sets the value of delta
to hold a NullValue.
Note that all the setters affecting delta are
mutually exclusive.
§Example
use wkt::NullValue;
let x = PartialArg::new().set_null_value(NullValue);
assert!(x.null_value().is_some());
assert!(x.number_value().is_none());
assert!(x.string_value().is_none());
assert!(x.bool_value().is_none());Sourcepub fn number_value(&self) -> Option<&f64>
pub fn number_value(&self) -> Option<&f64>
The value of delta
if it holds a NumberValue, None if the field is not set or
holds a different branch.
Sourcepub fn set_number_value<T: Into<f64>>(self, v: T) -> Self
pub fn set_number_value<T: Into<f64>>(self, v: T) -> Self
Sets the value of delta
to hold a NumberValue.
Note that all the setters affecting delta are
mutually exclusive.
§Example
let x = PartialArg::new().set_number_value(42.0);
assert!(x.number_value().is_some());
assert!(x.null_value().is_none());
assert!(x.string_value().is_none());
assert!(x.bool_value().is_none());Sourcepub fn string_value(&self) -> Option<&String>
pub fn string_value(&self) -> Option<&String>
The value of delta
if it holds a StringValue, None if the field is not set or
holds a different branch.
Sourcepub fn set_string_value<T: Into<String>>(self, v: T) -> Self
pub fn set_string_value<T: Into<String>>(self, v: T) -> Self
Sets the value of delta
to hold a StringValue.
Note that all the setters affecting delta are
mutually exclusive.
§Example
let x = PartialArg::new().set_string_value("example");
assert!(x.string_value().is_some());
assert!(x.null_value().is_none());
assert!(x.number_value().is_none());
assert!(x.bool_value().is_none());Sourcepub fn bool_value(&self) -> Option<&bool>
pub fn bool_value(&self) -> Option<&bool>
The value of delta
if it holds a BoolValue, None if the field is not set or
holds a different branch.
Sourcepub fn set_bool_value<T: Into<bool>>(self, v: T) -> Self
pub fn set_bool_value<T: Into<bool>>(self, v: T) -> Self
Sets the value of delta
to hold a BoolValue.
Note that all the setters affecting delta are
mutually exclusive.
§Example
let x = PartialArg::new().set_bool_value(true);
assert!(x.bool_value().is_some());
assert!(x.null_value().is_none());
assert!(x.number_value().is_none());
assert!(x.string_value().is_none());Trait Implementations§
Source§impl Clone for PartialArg
impl Clone for PartialArg
Source§fn clone(&self) -> PartialArg
fn clone(&self) -> PartialArg
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 PartialArg
impl Debug for PartialArg
Source§impl Default for PartialArg
impl Default for PartialArg
Source§fn default() -> PartialArg
fn default() -> PartialArg
Source§impl PartialEq for PartialArg
impl PartialEq for PartialArg
impl StructuralPartialEq for PartialArg
Auto Trait Implementations§
impl Freeze for PartialArg
impl RefUnwindSafe for PartialArg
impl Send for PartialArg
impl Sync for PartialArg
impl Unpin for PartialArg
impl UnsafeUnpin for PartialArg
impl UnwindSafe for PartialArg
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