pub struct LineParams {
pub name: String,
pub group: GroupId,
pub orientation: Orientation,
pub min_position: f64,
pub max_position: f64,
pub position: Option<SpatialPosition>,
pub max_cars: Option<usize>,
pub kind: Option<LineKind>,
}Expand description
Parameters for creating a new line at runtime.
Fields§
§name: StringHuman-readable name.
group: GroupIdDispatch group to add this line to.
orientation: OrientationPhysical orientation.
min_position: f64Lowest reachable position on the line axis.
Used only when Self::kind is None; otherwise the kind’s
own bounds win. Kept for backward-compat with callers that
haven’t migrated to constructing
LineKind directly.
max_position: f64Highest reachable position on the line axis. See
Self::min_position for the kind interaction.
position: Option<SpatialPosition>Optional floor-plan position. On a Loop line this is the loop center.
max_cars: Option<usize>Maximum cars on this line (None = unlimited).
kind: Option<LineKind>Topology kind. When Some, takes precedence over the flat
min_position/max_position fields. When None, falls back
to LineKind::Linear
built from the flat fields — matches the pre-LineKind behavior.
Implementations§
Trait Implementations§
Source§impl Clone for LineParams
impl Clone for LineParams
Source§fn clone(&self) -> LineParams
fn clone(&self) -> LineParams
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 moreAuto Trait Implementations§
impl Freeze for LineParams
impl RefUnwindSafe for LineParams
impl Send for LineParams
impl Sync for LineParams
impl Unpin for LineParams
impl UnsafeUnpin for LineParams
impl UnwindSafe for LineParams
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