#[non_exhaustive]pub struct DataItemView {
pub data_item: Option<DataItem>,
pub annotations: Vec<Annotation>,
pub has_truncated_annotations: bool,
/* private fields */
}Expand description
A container for a single DataItem and Annotations on it.
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.data_item: Option<DataItem>The DataItem.
annotations: Vec<Annotation>The Annotations on the DataItem. If too many Annotations should be returned for the DataItem, this field will be truncated per annotations_limit in request. If it was, then the has_truncated_annotations will be set to true.
has_truncated_annotations: boolTrue if and only if the Annotations field has been truncated. It happens if more Annotations for this DataItem met the request’s annotation_filter than are allowed to be returned by annotations_limit. Note that if Annotations field is not being returned due to field mask, then this field will not be set to true no matter how many Annotations are there.
Implementations§
Source§impl DataItemView
impl DataItemView
pub fn new() -> Self
Sourcepub fn set_data_item<T: Into<Option<DataItem>>>(self, v: T) -> Self
pub fn set_data_item<T: Into<Option<DataItem>>>(self, v: T) -> Self
Sets the value of data_item.
Sourcepub fn set_annotations<T, V>(self, v: T) -> Self
pub fn set_annotations<T, V>(self, v: T) -> Self
Sets the value of annotations.
Sourcepub fn set_has_truncated_annotations<T: Into<bool>>(self, v: T) -> Self
pub fn set_has_truncated_annotations<T: Into<bool>>(self, v: T) -> Self
Sets the value of has_truncated_annotations.
Trait Implementations§
Source§impl Clone for DataItemView
impl Clone for DataItemView
Source§fn clone(&self) -> DataItemView
fn clone(&self) -> DataItemView
Returns a copy 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 DataItemView
impl Debug for DataItemView
Source§impl Default for DataItemView
impl Default for DataItemView
Source§fn default() -> DataItemView
fn default() -> DataItemView
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DataItemViewwhere
DataItemView: Default,
impl<'de> Deserialize<'de> for DataItemViewwhere
DataItemView: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Message for DataItemView
impl Message for DataItemView
Source§impl PartialEq for DataItemView
impl PartialEq for DataItemView
Source§impl Serialize for DataItemView
impl Serialize for DataItemView
impl StructuralPartialEq for DataItemView
Auto Trait Implementations§
impl Freeze for DataItemView
impl RefUnwindSafe for DataItemView
impl Send for DataItemView
impl Sync for DataItemView
impl Unpin for DataItemView
impl UnwindSafe for DataItemView
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