pub struct DataSection {
pub meta: Vec<Parameter>,
pub entities: Vec<EntityInstance>,
}Expand description
DATA section in STEP file
use std::str::FromStr;
use step_p21::ast::DataSection;
let input = r#"
DATA;
#1 = A(1.0, 2.0);
#2 = B(3.0, A((4.0, 5.0)));
#3 = B(6.0, #1);
ENDSEC;
"#;
let data_section = DataSection::from_str(input).unwrap();
dbg!(data_section);Fields§
§meta: Vec<Parameter>Metadata
entities: Vec<EntityInstance>Each lines in data section
Trait Implementations§
Source§impl AST for DataSection
impl AST for DataSection
fn parse(input: &str) -> ParseResult<'_, Self>
Source§impl Clone for DataSection
impl Clone for DataSection
Source§fn clone(&self) -> DataSection
fn clone(&self) -> DataSection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DataSection
impl Debug for DataSection
Source§impl FromStr for DataSection
impl FromStr for DataSection
Source§impl PartialEq for DataSection
impl PartialEq for DataSection
impl StructuralPartialEq for DataSection
Auto Trait Implementations§
impl Freeze for DataSection
impl RefUnwindSafe for DataSection
impl Send for DataSection
impl Sync for DataSection
impl Unpin for DataSection
impl UnsafeUnpin for DataSection
impl UnwindSafe for DataSection
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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