#[repr(i32)]pub enum SlotConfidence {
ConfidenceLow = 0,
ConfidenceMid = 1,
ConfidenceHigh = 2,
}Expand description
SlotConfidence indicates how confident the device is in its classification of a peeked slot, based on content, filename, and size.
Variants§
ConfidenceLow = 0
Filename/extension only, no content confirmation
ConfidenceMid = 1
Format detected but slot type inferred from size/filename
ConfidenceHigh = 2
Magic bytes match and format-specific content confirmed
Implementations§
Source§impl SlotConfidence
impl SlotConfidence
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for SlotConfidence
impl Clone for SlotConfidence
Source§fn clone(&self) -> SlotConfidence
fn clone(&self) -> SlotConfidence
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SlotConfidence
Source§impl Debug for SlotConfidence
impl Debug for SlotConfidence
Source§impl Default for SlotConfidence
impl Default for SlotConfidence
Source§fn default() -> SlotConfidence
fn default() -> SlotConfidence
Returns the “default value” for a type. Read more
impl Eq for SlotConfidence
Source§impl From<SlotConfidence> for i32
impl From<SlotConfidence> for i32
Source§fn from(value: SlotConfidence) -> i32
fn from(value: SlotConfidence) -> i32
Converts to this type from the input type.
Source§impl Hash for SlotConfidence
impl Hash for SlotConfidence
Source§impl Ord for SlotConfidence
impl Ord for SlotConfidence
Source§fn cmp(&self, other: &SlotConfidence) -> Ordering
fn cmp(&self, other: &SlotConfidence) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for SlotConfidence
impl PartialEq for SlotConfidence
Source§impl PartialOrd for SlotConfidence
impl PartialOrd for SlotConfidence
impl StructuralPartialEq for SlotConfidence
Source§impl TryFrom<i32> for SlotConfidence
impl TryFrom<i32> for SlotConfidence
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
The type returned in the event of a conversion error.
Source§fn try_from(value: i32) -> Result<SlotConfidence, UnknownEnumValue>
fn try_from(value: i32) -> Result<SlotConfidence, UnknownEnumValue>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for SlotConfidence
impl RefUnwindSafe for SlotConfidence
impl Send for SlotConfidence
impl Sync for SlotConfidence
impl Unpin for SlotConfidence
impl UnsafeUnpin for SlotConfidence
impl UnwindSafe for SlotConfidence
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