pub struct PcbConnection {
pub net_index: u16,
pub from_x: Coord,
pub from_y: Coord,
pub to_x: Coord,
pub to_y: Coord,
pub from_component_index: i16,
pub from_pad_index: i16,
pub to_component_index: i16,
pub to_pad_index: i16,
pub raw_data: Vec<u8>,
}Expand description
PCB connection (ratsnest) record.
A connection represents an unrouted connection between two points on the PCB. These are shown as “ratsnest” lines in the editor.
Binary format (43 bytes):
- Bytes 0-3: Net index (u16) + flags
- Bytes 4-7: Unknown (0xFF padding)
- Bytes 8-15: From point (X, Y as i32)
- Bytes 16-23: To point (X, Y as i32)
- Bytes 24-42: Component/pad indices and flags
Fields§
§net_index: u16Net index this connection belongs to.
from_x: CoordFrom X coordinate.
from_y: CoordFrom Y coordinate.
to_x: CoordTo X coordinate.
to_y: CoordTo Y coordinate.
from_component_index: i16From component index (-1 if none).
from_pad_index: i16From pad index (-1 if none).
to_component_index: i16To component index (-1 if none).
to_pad_index: i16To pad index (-1 if none).
raw_data: Vec<u8>Raw data for round-tripping unknown fields.
Implementations§
Trait Implementations§
Source§impl Clone for PcbConnection
impl Clone for PcbConnection
Source§fn clone(&self) -> PcbConnection
fn clone(&self) -> PcbConnection
Returns a duplicate of the value. Read more
1.0.0 · 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 PcbConnection
impl Debug for PcbConnection
Source§impl Default for PcbConnection
impl Default for PcbConnection
Source§fn default() -> PcbConnection
fn default() -> PcbConnection
Returns the “default value” for a type. Read more
Source§impl DumpTree for PcbConnection
impl DumpTree for PcbConnection
Source§fn dump(&self, tree: &mut TreeBuilder)
fn dump(&self, tree: &mut TreeBuilder)
Dump this item to the tree builder.
Source§fn dump_to_string(&self) -> String
fn dump_to_string(&self) -> String
Convenience method to dump to a string.
Source§fn dump_to_string_with_options(&self, options: DumpOptions) -> String
fn dump_to_string_with_options(&self, options: DumpOptions) -> String
Convenience method to dump to a string with options.
Source§impl FromBinary for PcbConnection
impl FromBinary for PcbConnection
Auto Trait Implementations§
impl Freeze for PcbConnection
impl RefUnwindSafe for PcbConnection
impl Send for PcbConnection
impl Sync for PcbConnection
impl Unpin for PcbConnection
impl UnwindSafe for PcbConnection
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