pub struct CameraCapFlags(/* private fields */);Expand description
MAVLink bitmask enum CAMERA_CAP_FLAGS for common dialect.
Camera capability flags (Bitmap)
Implementations§
Source§impl CameraCapFlags
impl CameraCapFlags
Sourcepub const CAPTURE_VIDEO: CameraCapFlags
pub const CAPTURE_VIDEO: CameraCapFlags
CAMERA_CAP_FLAGS_CAPTURE_VIDEO flag.
Camera is able to record video
Sourcepub const CAPTURE_IMAGE: CameraCapFlags
pub const CAPTURE_IMAGE: CameraCapFlags
CAMERA_CAP_FLAGS_CAPTURE_IMAGE flag.
Camera is able to capture images
Sourcepub const HAS_MODES: CameraCapFlags
pub const HAS_MODES: CameraCapFlags
CAMERA_CAP_FLAGS_HAS_MODES flag.
Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)
Sourcepub const CAN_CAPTURE_IMAGE_IN_VIDEO_MODE: CameraCapFlags
pub const CAN_CAPTURE_IMAGE_IN_VIDEO_MODE: CameraCapFlags
CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE flag.
Camera can capture images while in video mode
Sourcepub const CAN_CAPTURE_VIDEO_IN_IMAGE_MODE: CameraCapFlags
pub const CAN_CAPTURE_VIDEO_IN_IMAGE_MODE: CameraCapFlags
CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE flag.
Camera can capture videos while in Photo/Image mode
Sourcepub const HAS_IMAGE_SURVEY_MODE: CameraCapFlags
pub const HAS_IMAGE_SURVEY_MODE: CameraCapFlags
CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE flag.
Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)
Sourcepub const HAS_BASIC_ZOOM: CameraCapFlags
pub const HAS_BASIC_ZOOM: CameraCapFlags
CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM flag.
Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)
Sourcepub const HAS_BASIC_FOCUS: CameraCapFlags
pub const HAS_BASIC_FOCUS: CameraCapFlags
CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS flag.
Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)
Sourcepub const HAS_VIDEO_STREAM: CameraCapFlags
pub const HAS_VIDEO_STREAM: CameraCapFlags
CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM flag.
Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)
Sourcepub const HAS_TRACKING_POINT: CameraCapFlags
pub const HAS_TRACKING_POINT: CameraCapFlags
CAMERA_CAP_FLAGS_HAS_TRACKING_POINT flag.
Camera supports tracking of a point on the camera view.
Sourcepub const HAS_TRACKING_RECTANGLE: CameraCapFlags
pub const HAS_TRACKING_RECTANGLE: CameraCapFlags
CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE flag.
Camera supports tracking of a selection rectangle on the camera view.
Sourcepub const HAS_TRACKING_GEO_STATUS: CameraCapFlags
pub const HAS_TRACKING_GEO_STATUS: CameraCapFlags
CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS flag.
Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS).
Sourcepub const HAS_THERMAL_RANGE: CameraCapFlags
pub const HAS_THERMAL_RANGE: CameraCapFlags
CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE flag.
Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE).
Source§impl CameraCapFlags
impl CameraCapFlags
Sourcepub const fn empty() -> CameraCapFlags
pub const fn empty() -> CameraCapFlags
Get a flags value with all bits unset.
Sourcepub const fn all() -> CameraCapFlags
pub const fn all() -> CameraCapFlags
Get a flags value with all known bits set.
Sourcepub const fn bits(&self) -> u16
pub const fn bits(&self) -> u16
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
Sourcepub const fn from_bits(bits: u16) -> Option<CameraCapFlags>
pub const fn from_bits(bits: u16) -> Option<CameraCapFlags>
Convert from a bits value.
This method will return None if any unknown bits are set.
Sourcepub const fn from_bits_truncate(bits: u16) -> CameraCapFlags
pub const fn from_bits_truncate(bits: u16) -> CameraCapFlags
Convert from a bits value, unsetting any unknown bits.
Sourcepub const fn from_bits_retain(bits: u16) -> CameraCapFlags
pub const fn from_bits_retain(bits: u16) -> CameraCapFlags
Convert from a bits value exactly.
Sourcepub fn from_name(name: &str) -> Option<CameraCapFlags>
pub fn from_name(name: &str) -> Option<CameraCapFlags>
Get a flags value with the bits of a flag with the given name set.
This method will return None if name is empty or doesn’t
correspond to any named flag.
Sourcepub const fn intersects(&self, other: CameraCapFlags) -> bool
pub const fn intersects(&self, other: CameraCapFlags) -> bool
Whether any set bits in a source flags value are also set in a target flags value.
Sourcepub const fn contains(&self, other: CameraCapFlags) -> bool
pub const fn contains(&self, other: CameraCapFlags) -> bool
Whether all set bits in a source flags value are also set in a target flags value.
Sourcepub fn insert(&mut self, other: CameraCapFlags)
pub fn insert(&mut self, other: CameraCapFlags)
The bitwise or (|) of the bits in two flags values.
Sourcepub fn remove(&mut self, other: CameraCapFlags)
pub fn remove(&mut self, other: CameraCapFlags)
The intersection of a source flags value with the complement of a target flags
value (&!).
This method is not equivalent to self & !other when other has unknown bits set.
remove won’t truncate other, but the ! operator will.
Sourcepub fn toggle(&mut self, other: CameraCapFlags)
pub fn toggle(&mut self, other: CameraCapFlags)
The bitwise exclusive-or (^) of the bits in two flags values.
Sourcepub fn set(&mut self, other: CameraCapFlags, value: bool)
pub fn set(&mut self, other: CameraCapFlags, value: bool)
Call insert when value is true or remove when value is false.
Sourcepub const fn intersection(self, other: CameraCapFlags) -> CameraCapFlags
pub const fn intersection(self, other: CameraCapFlags) -> CameraCapFlags
The bitwise and (&) of the bits in two flags values.
Sourcepub const fn union(self, other: CameraCapFlags) -> CameraCapFlags
pub const fn union(self, other: CameraCapFlags) -> CameraCapFlags
The bitwise or (|) of the bits in two flags values.
Sourcepub const fn difference(self, other: CameraCapFlags) -> CameraCapFlags
pub const fn difference(self, other: CameraCapFlags) -> CameraCapFlags
The intersection of a source flags value with the complement of a target flags
value (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
Sourcepub const fn symmetric_difference(self, other: CameraCapFlags) -> CameraCapFlags
pub const fn symmetric_difference(self, other: CameraCapFlags) -> CameraCapFlags
The bitwise exclusive-or (^) of the bits in two flags values.
Sourcepub const fn complement(self) -> CameraCapFlags
pub const fn complement(self) -> CameraCapFlags
The bitwise negation (!) of the bits in a flags value, truncating the result.
Source§impl CameraCapFlags
impl CameraCapFlags
Sourcepub const fn iter(&self) -> Iter<CameraCapFlags> ⓘ
pub const fn iter(&self) -> Iter<CameraCapFlags> ⓘ
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
Sourcepub const fn iter_names(&self) -> IterNames<CameraCapFlags> ⓘ
pub const fn iter_names(&self) -> IterNames<CameraCapFlags> ⓘ
Yield a set of contained named flags values.
This method is like iter, except only yields bits in contained named flags.
Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
Trait Implementations§
Source§impl Binary for CameraCapFlags
impl Binary for CameraCapFlags
Source§impl BitAnd for CameraCapFlags
impl BitAnd for CameraCapFlags
Source§fn bitand(self, other: CameraCapFlags) -> CameraCapFlags
fn bitand(self, other: CameraCapFlags) -> CameraCapFlags
The bitwise and (&) of the bits in two flags values.
Source§type Output = CameraCapFlags
type Output = CameraCapFlags
& operator.Source§impl BitAndAssign for CameraCapFlags
impl BitAndAssign for CameraCapFlags
Source§fn bitand_assign(&mut self, other: CameraCapFlags)
fn bitand_assign(&mut self, other: CameraCapFlags)
The bitwise and (&) of the bits in two flags values.
Source§impl BitOr for CameraCapFlags
impl BitOr for CameraCapFlags
Source§fn bitor(self, other: CameraCapFlags) -> CameraCapFlags
fn bitor(self, other: CameraCapFlags) -> CameraCapFlags
The bitwise or (|) of the bits in two flags values.
Source§type Output = CameraCapFlags
type Output = CameraCapFlags
| operator.Source§impl BitOrAssign for CameraCapFlags
impl BitOrAssign for CameraCapFlags
Source§fn bitor_assign(&mut self, other: CameraCapFlags)
fn bitor_assign(&mut self, other: CameraCapFlags)
The bitwise or (|) of the bits in two flags values.
Source§impl BitXor for CameraCapFlags
impl BitXor for CameraCapFlags
Source§fn bitxor(self, other: CameraCapFlags) -> CameraCapFlags
fn bitxor(self, other: CameraCapFlags) -> CameraCapFlags
The bitwise exclusive-or (^) of the bits in two flags values.
Source§type Output = CameraCapFlags
type Output = CameraCapFlags
^ operator.Source§impl BitXorAssign for CameraCapFlags
impl BitXorAssign for CameraCapFlags
Source§fn bitxor_assign(&mut self, other: CameraCapFlags)
fn bitxor_assign(&mut self, other: CameraCapFlags)
The bitwise exclusive-or (^) of the bits in two flags values.
Source§impl Clone for CameraCapFlags
impl Clone for CameraCapFlags
Source§fn clone(&self) -> CameraCapFlags
fn clone(&self) -> CameraCapFlags
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CameraCapFlags
impl Debug for CameraCapFlags
Source§impl Default for CameraCapFlags
impl Default for CameraCapFlags
Source§fn default() -> CameraCapFlags
fn default() -> CameraCapFlags
Source§impl<'de> Deserialize<'de> for CameraCapFlags
impl<'de> Deserialize<'de> for CameraCapFlags
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CameraCapFlags, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CameraCapFlags, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Extend<CameraCapFlags> for CameraCapFlags
impl Extend<CameraCapFlags> for CameraCapFlags
Source§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = CameraCapFlags>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = CameraCapFlags>,
The bitwise or (|) of the bits in each flags value.
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl Flags for CameraCapFlags
impl Flags for CameraCapFlags
Source§const FLAGS: &'static [Flag<CameraCapFlags>]
const FLAGS: &'static [Flag<CameraCapFlags>]
Source§fn from_bits_retain(bits: u16) -> CameraCapFlags
fn from_bits_retain(bits: u16) -> CameraCapFlags
Source§fn contains_unknown_bits(&self) -> bool
fn contains_unknown_bits(&self) -> bool
true if any unknown bits are set.Source§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
Source§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
Source§fn iter_names(&self) -> IterNames<Self> ⓘ
fn iter_names(&self) -> IterNames<Self> ⓘ
Source§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
Source§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
Source§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|) of the bits in two flags values.Source§fn remove(&mut self, other: Self)where
Self: Sized,
fn remove(&mut self, other: Self)where
Self: Sized,
&!). Read moreSource§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^) of the bits in two flags values.Source§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&) of the bits in two flags values.Source§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
&!). Read moreSource§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^) of the bits in two flags values.Source§fn complement(self) -> Self
fn complement(self) -> Self
!) of the bits in a flags value, truncating the result.Source§impl FromIterator<CameraCapFlags> for CameraCapFlags
impl FromIterator<CameraCapFlags> for CameraCapFlags
Source§fn from_iter<T>(iterator: T) -> CameraCapFlagswhere
T: IntoIterator<Item = CameraCapFlags>,
fn from_iter<T>(iterator: T) -> CameraCapFlagswhere
T: IntoIterator<Item = CameraCapFlags>,
The bitwise or (|) of the bits in each flags value.
Source§impl IntoIterator for CameraCapFlags
impl IntoIterator for CameraCapFlags
Source§type Item = CameraCapFlags
type Item = CameraCapFlags
Source§type IntoIter = Iter<CameraCapFlags>
type IntoIter = Iter<CameraCapFlags>
Source§fn into_iter(self) -> <CameraCapFlags as IntoIterator>::IntoIter
fn into_iter(self) -> <CameraCapFlags as IntoIterator>::IntoIter
Source§impl LowerHex for CameraCapFlags
impl LowerHex for CameraCapFlags
Source§impl NamedType for CameraCapFlags
impl NamedType for CameraCapFlags
fn sid() -> SpectaID
Source§fn named_data_type(
type_map: &mut TypeCollection,
generics: &[DataType],
) -> NamedDataType
fn named_data_type( type_map: &mut TypeCollection, generics: &[DataType], ) -> NamedDataType
Source§fn definition_named_data_type(type_map: &mut TypeCollection) -> NamedDataType
fn definition_named_data_type(type_map: &mut TypeCollection) -> NamedDataType
Source§impl Not for CameraCapFlags
impl Not for CameraCapFlags
Source§fn not(self) -> CameraCapFlags
fn not(self) -> CameraCapFlags
The bitwise negation (!) of the bits in a flags value, truncating the result.
Source§type Output = CameraCapFlags
type Output = CameraCapFlags
! operator.Source§impl Octal for CameraCapFlags
impl Octal for CameraCapFlags
Source§impl PartialEq for CameraCapFlags
impl PartialEq for CameraCapFlags
Source§impl Serialize for CameraCapFlags
impl Serialize for CameraCapFlags
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Source§impl Sub for CameraCapFlags
impl Sub for CameraCapFlags
Source§fn sub(self, other: CameraCapFlags) -> CameraCapFlags
fn sub(self, other: CameraCapFlags) -> CameraCapFlags
The intersection of a source flags value with the complement of a target flags value (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
Source§type Output = CameraCapFlags
type Output = CameraCapFlags
- operator.Source§impl SubAssign for CameraCapFlags
impl SubAssign for CameraCapFlags
Source§fn sub_assign(&mut self, other: CameraCapFlags)
fn sub_assign(&mut self, other: CameraCapFlags)
The intersection of a source flags value with the complement of a target flags value (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
Source§impl Type for CameraCapFlags
impl Type for CameraCapFlags
Source§fn inline(type_map: &mut TypeCollection, generics: Generics<'_>) -> DataType
fn inline(type_map: &mut TypeCollection, generics: Generics<'_>) -> DataType
Source§fn reference(type_map: &mut TypeCollection, generics: &[DataType]) -> Reference
fn reference(type_map: &mut TypeCollection, generics: &[DataType]) -> Reference
definition will be put into the type map.