#[non_exhaustive]#[repr(i32)]pub enum ItemType {
Structure = 0,
Integer = 1,
LongInteger = 2,
BigInteger = 3,
Enumeration = 4,
Boolean = 5,
TextString = 6,
ByteString = 7,
DateTime = 8,
Interval = 9,
}Expand description
Item Type as a KMIP Integer (u32).
Note: We don’t encode it as a u8 which is how Item Type is defined in KMIP 1.1 section 9.1.1.2 because this is for use with KMIP 1.1 section 2.1.9 Extension Information which defines it as a KMIP Integer (i32).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Structure = 0
Integer = 1
LongInteger = 2
BigInteger = 3
Enumeration = 4
Boolean = 5
TextString = 6
ByteString = 7
DateTime = 8
Interval = 9
Implementations§
Source§impl ItemType
impl ItemType
pub const TAG: Tag
pub fn fast_scan(scanner: &mut FastScanner<'_>) -> Result<Self, FastScanError>
pub fn fast_scan_with( scanner: &mut FastScanner<'_>, tag: Tag, ) -> Result<Self, FastScanError>
pub fn fast_scan_opt( scanner: &mut FastScanner<'_>, ) -> Result<Option<Self>, FastScanError>
pub fn fast_scan_opt_with( scanner: &mut FastScanner<'_>, tag: Tag, ) -> Result<Option<Self>, FastScanError>
pub fn format(&self, formatter: &mut Formatter<'_>) -> FormatResult
pub fn format_with( &self, formatter: &mut Formatter<'_>, tag: Tag, ) -> FormatResult
Trait Implementations§
impl Copy for ItemType
impl Eq for ItemType
Source§impl Ordinalize for ItemType
impl Ordinalize for ItemType
Source§const VARIANT_COUNT: usize = 10usize
const VARIANT_COUNT: usize = 10usize
The count of variants.
Source§type VariantType = i32
type VariantType = i32
The type of the values of the variants.
Source§unsafe fn from_ordinal_unsafe(number: i32) -> Self
unsafe fn from_ordinal_unsafe(number: i32) -> Self
Obtain a variant based on an integer number. Read more
Source§fn from_ordinal(number: i32) -> Option<Self>
fn from_ordinal(number: i32) -> Option<Self>
Obtain a variant based on an integer number.
impl StructuralPartialEq for ItemType
Auto Trait Implementations§
impl Forget for ItemType
impl Freeze for ItemType
impl RefUnwindSafe for ItemType
impl Send for ItemType
impl Sync for ItemType
impl Unpin for ItemType
impl UnsafeUnpin for ItemType
impl UnwindSafe for ItemType
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