Struct kicad_parse_gen::schematic::Component
[−]
[src]
pub struct Component { pub name: String, pub reference: String, pub u: String, pub x: i64, pub y: i64, pub ar_path: Vec<String>, pub fields: Vec<ComponentField>, pub rotation: ComponentRotation, }
a schematic component
Fields
name: String
name
reference: String
reference
u: String
u
x: i64
X coordinate
y: i64
Y coordinate
ar_path: Vec<String>
ARPath
fields: Vec<ComponentField>
component fields
rotation: ComponentRotation
rotation
Methods
impl Component
[src]
fn get_field_value(&self, name: &str) -> Option<String>
[src]
get a component field value by name
fn get_field(&self, name: &str) -> Option<ComponentField>
[src]
get a component field by name
fn get_available_field_num(&self) -> i64
[src]
get the first free component field number
fn fields_hash(&self) -> HashMap<String, String>
[src]
get the component fields as a hashmap
fn update_reference(&mut self, r: String)
[src]
update the reference of a component
fn update_name(&mut self, n: String)
[src]
update the name of a component
fn update_field(&mut self, name: &str, value: &str)
[src]
update name and value of a component field
fn add_or_update_field(
&mut self,
template: &ComponentField,
name: &str,
value: &str
) -> FieldUpdate
[src]
&mut self,
template: &ComponentField,
name: &str,
value: &str
) -> FieldUpdate
update or add name and value of a component field
fn add_new_field(&mut self, template: &ComponentField, name: &str, value: &str)
[src]
add a new component field based on an existing one but with a new name and value
Trait Implementations
impl Debug for Component
[src]
impl Clone for Component
[src]
fn clone(&self) -> Component
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for Component
[src]
impl BoundingBox for Component
[src]
fn bounding_box(&self) -> Bound
[src]
calculate the bounding box of a layout item