-- SPDX-License-Identifier: MIT
-- Copyright (C) 2018-present iced project and contributors

-- ⚠️This file was generated by GENERATOR!🦹‍♂️

---@meta
---@diagnostic disable unused-local

---Contains the offsets of the displacement and immediate.
---
---Call `Decoder:get_constant_offsets()` or `Encoder:get_constant_offsets()` to get the
---offsets of the constants after the instruction has been decoded/encoded.
---
---@class ConstantOffsets
local ConstantOffsets = {}

---The offset of the displacement, if any
---
---@return integer
function ConstantOffsets:displacement_offset() end

---Size in bytes of the displacement, or 0 if there's no displacement
---
---@return integer
function ConstantOffsets:displacement_size() end

---The offset of the first immediate, if any.
---
---This field can be invalid even if the operand has an immediate if it's an immediate that isn't part
---of the instruction stream, eg. `SHL AL,1`.
---
---@return integer
function ConstantOffsets:immediate_offset() end

---Size in bytes of the first immediate, or 0 if there's no immediate
---
---@return integer
function ConstantOffsets:immediate_size() end

---The offset of the second immediate, if any.
---
---@return integer
function ConstantOffsets:immediate_offset2() end

---Size in bytes of the second immediate, or 0 if there's no second immediate
---
---@return integer
function ConstantOffsets:immediate_size2() end

---`true` if `ConstantOffsets:displacement_offset()` and `ConstantOffsets:displacement_size()` are valid
---
---@return boolean
function ConstantOffsets:has_displacement() end

---`true` if `ConstantOffsets:immediate_offset()` and `ConstantOffsets:immediate_size()` are valid
---
---@return boolean
function ConstantOffsets:has_immediate() end

---`true` if `ConstantOffsets:immediate_offset2()` and `ConstantOffsets:immediate_size2()` are valid
---
---@return boolean
function ConstantOffsets:has_immediate2() end

---Returns a copy of this instance.
---
---@return ConstantOffsets #A copy of this instance
function ConstantOffsets:copy() end

return ConstantOffsets
