pub struct SheetState {
pub sheets: Vec<Sheet>,
pub id_counter: u64,
}Expand description
The document’s sheets block.
Fields§
§sheets: Vec<Sheet>§id_counter: u64Mints every sheet AND placed-view id (SHEET{n}, SV{n}); monotonic,
never reused, re-seeded from the largest numeric suffix on load — the
pmi block’s counter rule, so a merged or edited document never
collides.
Implementations§
Source§impl SheetState
impl SheetState
Sourcepub fn next_id(&mut self, prefix: &str) -> String
pub fn next_id(&mut self, prefix: &str) -> String
Mint the next id with prefix (SHEET → SHEET3), re-seeding the
counter from the largest numeric suffix already in the block.
pub fn find_sheet(&self, id: &str) -> Option<&Sheet>
pub fn find_sheet_mut(&mut self, id: &str) -> Option<&mut Sheet>
Sourcepub fn locate_view(&self, id: &str) -> Option<(String, usize)>
pub fn locate_view(&self, id: &str) -> Option<(String, usize)>
The sheet id and index of placed view id.
pub fn find_view_mut(&mut self, id: &str) -> Option<&mut PlacedView>
Sourcepub fn locate_dimension(&self, id: &str) -> Option<(String, usize)>
pub fn locate_dimension(&self, id: &str) -> Option<(String, usize)>
The sheet id and index of dimension id.
pub fn find_dimension(&self, id: &str) -> Option<&SheetDimension>
pub fn find_dimension_mut(&mut self, id: &str) -> Option<&mut SheetDimension>
Sourcepub fn locate_ordinate(&self, id: &str) -> Option<(String, usize)>
pub fn locate_ordinate(&self, id: &str) -> Option<(String, usize)>
The sheet id and index of ordinate set id.
pub fn find_ordinate(&self, id: &str) -> Option<&SheetOrdinate>
pub fn find_ordinate_mut(&mut self, id: &str) -> Option<&mut SheetOrdinate>
Trait Implementations§
Source§impl Clone for SheetState
impl Clone for SheetState
Source§impl Debug for SheetState
impl Debug for SheetState
Source§impl Default for SheetState
impl Default for SheetState
Source§impl<'de> Deserialize<'de> for SheetState
impl<'de> Deserialize<'de> for SheetState
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 PartialEq for SheetState
impl PartialEq for SheetState
Source§impl Serialize for SheetState
impl Serialize for SheetState
impl StructuralPartialEq for SheetState
Auto Trait Implementations§
impl Freeze for SheetState
impl RefUnwindSafe for SheetState
impl Send for SheetState
impl Sync for SheetState
impl Unpin for SheetState
impl UnsafeUnpin for SheetState
impl UnwindSafe for SheetState
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more