pub struct CardIndex {
pub function: usize,
pub card_index: FunctionCardIndex,
}
Expand description
Uniquely index a card in a module
Fields§
§function: usize
§card_index: FunctionCardIndex
Implementations§
Source§impl CardIndex
impl CardIndex
pub fn function(function: usize) -> Self
pub fn new(function: usize, card_index: usize) -> Self
pub fn from_slice(function: usize, indices: &[u32]) -> Self
pub fn push_subindex(&mut self, i: u32)
pub fn pop_subindex(&mut self)
pub fn as_handle(&self) -> Handle
Sourcepub fn with_sub_index(self, card_index: usize) -> Self
pub fn with_sub_index(self, card_index: usize) -> Self
pushes a new sub-index to the bottom layer
pub fn current_index(&self) -> usize
Sourcepub fn with_current_index(self, card_index: usize) -> Self
pub fn with_current_index(self, card_index: usize) -> Self
Replaces the card index of the leaf node
pub fn set_current_index(&mut self, card_index: usize)
Sourcepub fn begin(&self) -> Result<usize, CardFetchError>
pub fn begin(&self) -> Result<usize, CardFetchError>
first card’s index in the function
Sourcepub fn is_top_level_card(&self) -> bool
pub fn is_top_level_card(&self) -> bool
Return wether this index points to a ‘top level’ card in the function. Instead of a nested card.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CardIndex
impl<'de> Deserialize<'de> for CardIndex
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for CardIndex
impl Ord for CardIndex
Source§impl PartialOrd for CardIndex
impl PartialOrd for CardIndex
impl Eq for CardIndex
impl StructuralPartialEq for CardIndex
Auto Trait Implementations§
impl Freeze for CardIndex
impl RefUnwindSafe for CardIndex
impl Send for CardIndex
impl Sync for CardIndex
impl Unpin for CardIndex
impl UnwindSafe for CardIndex
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