#[non_exhaustive]pub struct ObjectTrackingAnnotation {
pub entity: Option<Entity>,
pub confidence: f32,
pub frames: Vec<ObjectTrackingFrame>,
pub version: String,
pub track_info: Option<TrackInfo>,
/* private fields */
}Expand description
Annotations corresponding to one tracked object.
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.entity: Option<Entity>Entity to specify the object category that this track is labeled as.
confidence: f32Object category’s labeling confidence of this track.
frames: Vec<ObjectTrackingFrame>Information corresponding to all frames where this object track appears. Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame messages in frames. Streaming mode: it can only be one ObjectTrackingFrame message in frames.
version: StringFeature version.
track_info: Option<TrackInfo>Different representation of tracking info in non-streaming batch and streaming modes.
Implementations§
Source§impl ObjectTrackingAnnotation
impl ObjectTrackingAnnotation
Sourcepub fn set_entity<T>(self, v: T) -> Self
pub fn set_entity<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_entity<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_entity<T>(self, v: Option<T>) -> Self
Sourcepub fn set_confidence<T: Into<f32>>(self, v: T) -> Self
pub fn set_confidence<T: Into<f32>>(self, v: T) -> Self
Sets the value of confidence.
§Example
let x = ObjectTrackingAnnotation::new().set_confidence(42.0);Sourcepub fn set_frames<T, V>(self, v: T) -> Self
pub fn set_frames<T, V>(self, v: T) -> Self
Sourcepub fn set_version<T: Into<String>>(self, v: T) -> Self
pub fn set_version<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_track_info<T: Into<Option<TrackInfo>>>(self, v: T) -> Self
pub fn set_track_info<T: Into<Option<TrackInfo>>>(self, v: T) -> Self
Sets the value of track_info.
Note that all the setters affecting track_info are mutually
exclusive.
§Example
use google_cloud_videointelligence_v1::model::object_tracking_annotation::TrackInfo;
let x = ObjectTrackingAnnotation::new().set_track_info(Some(TrackInfo::TrackId(42)));Sourcepub fn segment(&self) -> Option<&Box<VideoSegment>>
pub fn segment(&self) -> Option<&Box<VideoSegment>>
The value of track_info
if it holds a Segment, None if the field is not set or
holds a different branch.
Sourcepub fn set_segment<T: Into<Box<VideoSegment>>>(self, v: T) -> Self
pub fn set_segment<T: Into<Box<VideoSegment>>>(self, v: T) -> Self
Sets the value of track_info
to hold a Segment.
Note that all the setters affecting track_info are
mutually exclusive.
§Example
use google_cloud_videointelligence_v1::model::VideoSegment;
let x = ObjectTrackingAnnotation::new().set_segment(VideoSegment::default()/* use setters */);
assert!(x.segment().is_some());
assert!(x.track_id().is_none());Sourcepub fn track_id(&self) -> Option<&i64>
pub fn track_id(&self) -> Option<&i64>
The value of track_info
if it holds a TrackId, None if the field is not set or
holds a different branch.
Sourcepub fn set_track_id<T: Into<i64>>(self, v: T) -> Self
pub fn set_track_id<T: Into<i64>>(self, v: T) -> Self
Sets the value of track_info
to hold a TrackId.
Note that all the setters affecting track_info are
mutually exclusive.
§Example
let x = ObjectTrackingAnnotation::new().set_track_id(42);
assert!(x.track_id().is_some());
assert!(x.segment().is_none());Trait Implementations§
Source§impl Clone for ObjectTrackingAnnotation
impl Clone for ObjectTrackingAnnotation
Source§fn clone(&self) -> ObjectTrackingAnnotation
fn clone(&self) -> ObjectTrackingAnnotation
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 ObjectTrackingAnnotation
impl Debug for ObjectTrackingAnnotation
Source§impl Default for ObjectTrackingAnnotation
impl Default for ObjectTrackingAnnotation
Source§fn default() -> ObjectTrackingAnnotation
fn default() -> ObjectTrackingAnnotation
Source§impl Message for ObjectTrackingAnnotation
impl Message for ObjectTrackingAnnotation
Source§impl PartialEq for ObjectTrackingAnnotation
impl PartialEq for ObjectTrackingAnnotation
Source§fn eq(&self, other: &ObjectTrackingAnnotation) -> bool
fn eq(&self, other: &ObjectTrackingAnnotation) -> bool
self and other values to be equal, and is used by ==.