#[repr(i32)]pub enum OffsetType {
Undefined = 0,
OffsetElements = 1,
OffsetBytes = 2,
OffsetBits = 3,
}Expand description
Avaliable offset types.
When setting a parameter value user can specify an offset and length
Variants§
Undefined = 0
OffsetElements = 1
Offset and length is calculated in the elements. For example update an array starting from the element number 3.
OffsetBytes = 2
Offset and length is calculated in bytes.
OffsetBits = 3
Offset and length is calculated in bits.
Implementations§
Source§impl OffsetType
impl OffsetType
Source§impl OffsetType
impl OffsetType
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 OffsetType
impl Clone for OffsetType
Source§fn clone(&self) -> OffsetType
fn clone(&self) -> OffsetType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OffsetType
impl Debug for OffsetType
Source§impl Default for OffsetType
impl Default for OffsetType
Source§fn default() -> OffsetType
fn default() -> OffsetType
Returns the “default value” for a type. Read more
Source§impl From<OffsetType> for i32
impl From<OffsetType> for i32
Source§fn from(value: OffsetType) -> i32
fn from(value: OffsetType) -> i32
Converts to this type from the input type.
Source§impl Hash for OffsetType
impl Hash for OffsetType
Source§impl Ord for OffsetType
impl Ord for OffsetType
Source§fn cmp(&self, other: &OffsetType) -> Ordering
fn cmp(&self, other: &OffsetType) -> Ordering
1.21.0 · 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
Source§impl PartialEq for OffsetType
impl PartialEq for OffsetType
Source§impl PartialOrd for OffsetType
impl PartialOrd for OffsetType
Source§impl TryFrom<i32> for OffsetType
impl TryFrom<i32> for OffsetType
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
The type returned in the event of a conversion error.
Source§fn try_from(value: i32) -> Result<OffsetType, UnknownEnumValue>
fn try_from(value: i32) -> Result<OffsetType, UnknownEnumValue>
Performs the conversion.
impl Copy for OffsetType
impl Eq for OffsetType
impl StructuralPartialEq for OffsetType
Auto Trait Implementations§
impl Freeze for OffsetType
impl RefUnwindSafe for OffsetType
impl Send for OffsetType
impl Sync for OffsetType
impl Unpin for OffsetType
impl UnwindSafe for OffsetType
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