pub struct KeypointStyle { /* private fields */ }Expand description
Keypoint-specific style configuration.
Implementations§
Source§impl KeypointStyle
impl KeypointStyle
Sourcepub fn with_visible(self, x: bool) -> Self
pub fn with_visible(self, x: bool) -> Self
Sourcepub fn with_text_visible(self, x: bool) -> Self
pub fn with_text_visible(self, x: bool) -> Self
Sourcepub fn text_visible(&self) -> bool
pub fn text_visible(&self) -> bool
Sourcepub fn with_draw_fill(self, x: bool) -> Self
pub fn with_draw_fill(self, x: bool) -> Self
Sourcepub fn with_draw_outline(self, x: bool) -> Self
pub fn with_draw_outline(self, x: bool) -> Self
Sourcepub fn draw_outline(&self) -> bool
pub fn draw_outline(&self) -> bool
Sourcepub fn with_fill_color(self, x: ColorSource) -> Self
pub fn with_fill_color(self, x: ColorSource) -> Self
Sourcepub fn fill_color(&self) -> &ColorSource
pub fn fill_color(&self) -> &ColorSource
Sourcepub fn into_fill_color(self) -> ColorSource
pub fn into_fill_color(self) -> ColorSource
Consumes self and returns the fill_color field.
This method moves the owned value out of the struct without cloning.
§Returns
Returns the owned value of type ColorSource.
§Example
let obj = KeypointStyle::default().with_fill_color(value);
let value = obj.into_fill_color();
// obj is now consumed and cannot be usedGenerated by aksr - Builder pattern macro
Sourcepub fn with_outline_color(self, x: ColorSource) -> Self
pub fn with_outline_color(self, x: ColorSource) -> Self
Sourcepub fn outline_color(&self) -> &ColorSource
pub fn outline_color(&self) -> &ColorSource
Sourcepub fn into_outline_color(self) -> ColorSource
pub fn into_outline_color(self) -> ColorSource
Consumes self and returns the outline_color field.
This method moves the owned value out of the struct without cloning.
§Returns
Returns the owned value of type ColorSource.
§Example
let obj = KeypointStyle::default().with_outline_color(value);
let value = obj.into_outline_color();
// obj is now consumed and cannot be usedGenerated by aksr - Builder pattern macro
Sourcepub fn with_mode(self, x: KeypointStyleMode) -> Self
pub fn with_mode(self, x: KeypointStyleMode) -> Self
Sourcepub fn mode(&self) -> &KeypointStyleMode
pub fn mode(&self) -> &KeypointStyleMode
Sourcepub fn into_mode(self) -> KeypointStyleMode
pub fn into_mode(self) -> KeypointStyleMode
Consumes self and returns the mode field.
This method moves the owned value out of the struct without cloning.
§Returns
Returns the owned value of type KeypointStyleMode.
§Example
let obj = KeypointStyle::default().with_mode(value);
let value = obj.into_mode();
// obj is now consumed and cannot be usedGenerated by aksr - Builder pattern macro
Sourcepub fn with_radius(self, x: usize) -> Self
pub fn with_radius(self, x: usize) -> Self
Sourcepub fn with_thickness(self, x: usize) -> Self
pub fn with_thickness(self, x: usize) -> Self
Sourcepub fn with_skeleton(self, x: Skeleton) -> Self
pub fn with_skeleton(self, x: Skeleton) -> Self
Sets the optional skeleton field.
§Arguments
x- The value that will be automatically wrapped inSome
§Returns
Returns Self for method chaining.
§Note
The value is automatically wrapped in Some, so you don’t need to pass Some(value).
§Example
let obj = KeypointStyle::default().with_skeleton(value);Generated by aksr - Builder pattern macro
Sourcepub fn into_skeleton(self) -> Option<Skeleton>
pub fn into_skeleton(self) -> Option<Skeleton>
Consumes self and returns the skeleton field.
This method moves the owned value out of the struct without cloning.
§Returns
Returns Option
§Example
let obj = KeypointStyle::default().with_skeleton(value);
let value = obj.into_skeleton();Generated by aksr - Builder pattern macro
Sourcepub fn take_skeleton(&mut self) -> Option<Skeleton>
pub fn take_skeleton(&mut self) -> Option<Skeleton>
Takes the skeleton field, leaving None in its place.
This method moves the value out and replaces it with None, allowing you to continue using the struct.
§Returns
Returns Option
§Note
This does not require the inner type to implement Default.
§Example
let mut obj = KeypointStyle::default().with_skeleton(value);
let value = obj.take_skeleton();
// obj.skeleton is now NoneGenerated by aksr - Builder pattern macro
Sourcepub fn with_skeleton_thickness(self, x: usize) -> Self
pub fn with_skeleton_thickness(self, x: usize) -> Self
Sourcepub fn skeleton_thickness(&self) -> usize
pub fn skeleton_thickness(&self) -> usize
Sourcepub fn with_text_style(self, x: TextStyle) -> Self
pub fn with_text_style(self, x: TextStyle) -> Self
Sourcepub fn text_style(&self) -> &TextStyle
pub fn text_style(&self) -> &TextStyle
Sourcepub fn into_text_style(self) -> TextStyle
pub fn into_text_style(self) -> TextStyle
Consumes self and returns the text_style field.
This method moves the owned value out of the struct without cloning.
§Returns
Returns the owned value of type TextStyle.
§Example
let obj = KeypointStyle::default().with_text_style(value);
let value = obj.into_text_style();
// obj is now consumed and cannot be usedGenerated by aksr - Builder pattern macro
Sourcepub fn with_palette(self, x: &[Color]) -> Self
pub fn with_palette(self, x: &[Color]) -> Self
Sets the palette field from a slice.
§Arguments
x- A slice of elements to be converted into a vector
§Returns
Returns Self for method chaining.
§Note
If the slice is empty, the field remains unchanged.
§Example
let obj = KeypointStyle::default().with_palette(&[item1, item2]);Generated by aksr - Builder pattern macro
Sourcepub fn into_palette(self) -> Vec<Color>
pub fn into_palette(self) -> Vec<Color>
Consumes self and returns the palette field.
This method moves the owned value out of the struct without cloning.
§Returns
Returns the owned value of type Vec < Color >.
§Example
let obj = KeypointStyle::default().with_palette(value);
let value = obj.into_palette();
// obj is now consumed and cannot be usedGenerated by aksr - Builder pattern macro
Sourcepub fn take_palette(&mut self) -> Vec<Color>
pub fn take_palette(&mut self) -> Vec<Color>
Takes the palette field and replaces it with Default::default().
This method moves the value out and replaces it with the default value, allowing you to continue using the struct.
§Returns
Returns the owned value of type Vec < Color >.
§Note
Requires the field type Vec < Color > to implement Default. Prefer this when you want to keep using the instance.
§Example
let mut obj = KeypointStyle::default().with_palette(value);
let value = obj.take_palette();
// obj.palette is now set to Default::default()Generated by aksr - Builder pattern macro
Source§impl KeypointStyle
impl KeypointStyle
Sourcepub fn show_confidence(self, show: bool) -> Self
pub fn show_confidence(self, show: bool) -> Self
Set show_confidence in text_style
Trait Implementations§
Source§impl Clone for KeypointStyle
impl Clone for KeypointStyle
Source§fn clone(&self) -> KeypointStyle
fn clone(&self) -> KeypointStyle
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 KeypointStyle
impl Debug for KeypointStyle
Source§impl Default for KeypointStyle
impl Default for KeypointStyle
Source§impl Palette for KeypointStyle
impl Palette for KeypointStyle
Source§impl PartialEq for KeypointStyle
impl PartialEq for KeypointStyle
Source§fn eq(&self, other: &KeypointStyle) -> bool
fn eq(&self, other: &KeypointStyle) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for KeypointStyle
Auto Trait Implementations§
impl Freeze for KeypointStyle
impl RefUnwindSafe for KeypointStyle
impl Send for KeypointStyle
impl Sync for KeypointStyle
impl Unpin for KeypointStyle
impl UnsafeUnpin for KeypointStyle
impl UnwindSafe for KeypointStyle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.