pub struct PcbClass {
pub name: String,
pub kind: ClassKind,
pub superclass: bool,
pub auto_generated: bool,
pub auto_generated_kind: i32,
pub sch_auto_generated_cluster: bool,
pub unique_id: String,
pub selected: bool,
pub params: ParameterCollection,
}Expand description
A PCB class definition.
Classes are used to group related objects (nets, components, pads, etc.) for applying design rules, visibility settings, or organization.
Fields§
§name: StringClass name.
kind: ClassKindThe kind of class (Net, Component, Pad, etc.).
superclass: boolWhether this is a superclass (contains all objects of this kind).
auto_generated: boolWhether this class was auto-generated.
auto_generated_kind: i32Kind of auto-generation (0=none, 1=bottom side, 2=top side).
sch_auto_generated_cluster: boolWhether this is a schematic auto-generated cluster.
unique_id: StringUnique ID for the class.
selected: boolWhether the class is selected.
params: ParameterCollectionAll parameters (for round-tripping unknown fields).
Implementations§
Source§impl PcbClass
impl PcbClass
Sourcepub fn new(name: &str, kind: ClassKind) -> Self
pub fn new(name: &str, kind: ClassKind) -> Self
Create a new class with the given name and kind.
Sourcepub fn from_params(params: &ParameterCollection) -> Self
pub fn from_params(params: &ParameterCollection) -> Self
Parse a class from parameters.
Sourcepub fn to_params(&self) -> ParameterCollection
pub fn to_params(&self) -> ParameterCollection
Export to parameters.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PcbClass
impl RefUnwindSafe for PcbClass
impl Send for PcbClass
impl Sync for PcbClass
impl Unpin for PcbClass
impl UnwindSafe for PcbClass
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