pub enum BoardItem {
Track(Track),
ArcTrack(ArcTrack),
Via(Via),
}
Variants§
Implementations§
Source§impl BoardItem
impl BoardItem
Sourcepub fn as_track_mut(&mut self) -> Option<&mut Track>
pub fn as_track_mut(&mut self) -> Option<&mut Track>
Optionally returns mutable references to the inner fields if this is a BoardItem::Track
, otherwise None
Sourcepub fn as_track(&self) -> Option<&Track>
pub fn as_track(&self) -> Option<&Track>
Optionally returns references to the inner fields if this is a BoardItem::Track
, otherwise None
Sourcepub fn into_track(self) -> Result<Track, Self>
pub fn into_track(self) -> Result<Track, Self>
Returns the inner fields if this is a BoardItem::Track
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_arc_track(&self) -> bool
pub fn is_arc_track(&self) -> bool
Returns true if this is a BoardItem::ArcTrack
, otherwise false
Sourcepub fn as_arc_track_mut(&mut self) -> Option<&mut ArcTrack>
pub fn as_arc_track_mut(&mut self) -> Option<&mut ArcTrack>
Optionally returns mutable references to the inner fields if this is a BoardItem::ArcTrack
, otherwise None
Sourcepub fn as_arc_track(&self) -> Option<&ArcTrack>
pub fn as_arc_track(&self) -> Option<&ArcTrack>
Optionally returns references to the inner fields if this is a BoardItem::ArcTrack
, otherwise None
Sourcepub fn into_arc_track(self) -> Result<ArcTrack, Self>
pub fn into_arc_track(self) -> Result<ArcTrack, Self>
Returns the inner fields if this is a BoardItem::ArcTrack
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn as_via_mut(&mut self) -> Option<&mut Via>
pub fn as_via_mut(&mut self) -> Option<&mut Via>
Optionally returns mutable references to the inner fields if this is a BoardItem::Via
, otherwise None