pub enum Node {
Show 15 variants
AirAirline(AirAirline),
AirAirport(AirAirport),
AirFlight(AirFlight),
AirGate(AirGate),
BusCompany(BusCompany),
BusLine(BusLine),
BusStop(BusStop),
SeaCompany(SeaCompany),
SeaLine(SeaLine),
SeaStop(SeaStop),
RailCompany(RailCompany),
RailLine(RailLine),
RailStation(RailStation),
SpawnWarp(SpawnWarp),
Town(Town),
}
Variants§
AirAirline(AirAirline)
AirAirport(AirAirport)
AirFlight(AirFlight)
AirGate(AirGate)
BusCompany(BusCompany)
BusLine(BusLine)
BusStop(BusStop)
SeaCompany(SeaCompany)
SeaLine(SeaLine)
SeaStop(SeaStop)
RailCompany(RailCompany)
RailLine(RailLine)
RailStation(RailStation)
SpawnWarp(SpawnWarp)
Town(Town)
Implementations§
Source§impl Node
impl Node
Sourcepub fn is_air_airline(&self) -> bool
pub fn is_air_airline(&self) -> bool
Returns true if this is a Node::AirAirline
, otherwise false
Sourcepub fn as_air_airline_mut(&mut self) -> Option<&mut AirAirline>
pub fn as_air_airline_mut(&mut self) -> Option<&mut AirAirline>
Optionally returns mutable references to the inner fields if this is a Node::AirAirline
, otherwise None
Sourcepub fn as_air_airline(&self) -> Option<&AirAirline>
pub fn as_air_airline(&self) -> Option<&AirAirline>
Optionally returns references to the inner fields if this is a Node::AirAirline
, otherwise None
Sourcepub fn into_air_airline(self) -> Result<AirAirline, Self>
pub fn into_air_airline(self) -> Result<AirAirline, Self>
Returns the inner fields if this is a Node::AirAirline
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_air_airport(&self) -> bool
pub fn is_air_airport(&self) -> bool
Returns true if this is a Node::AirAirport
, otherwise false
Sourcepub fn as_air_airport_mut(&mut self) -> Option<&mut AirAirport>
pub fn as_air_airport_mut(&mut self) -> Option<&mut AirAirport>
Optionally returns mutable references to the inner fields if this is a Node::AirAirport
, otherwise None
Sourcepub fn as_air_airport(&self) -> Option<&AirAirport>
pub fn as_air_airport(&self) -> Option<&AirAirport>
Optionally returns references to the inner fields if this is a Node::AirAirport
, otherwise None
Sourcepub fn into_air_airport(self) -> Result<AirAirport, Self>
pub fn into_air_airport(self) -> Result<AirAirport, Self>
Returns the inner fields if this is a Node::AirAirport
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_air_flight(&self) -> bool
pub fn is_air_flight(&self) -> bool
Returns true if this is a Node::AirFlight
, otherwise false
Sourcepub fn as_air_flight_mut(&mut self) -> Option<&mut AirFlight>
pub fn as_air_flight_mut(&mut self) -> Option<&mut AirFlight>
Optionally returns mutable references to the inner fields if this is a Node::AirFlight
, otherwise None
Sourcepub fn as_air_flight(&self) -> Option<&AirFlight>
pub fn as_air_flight(&self) -> Option<&AirFlight>
Optionally returns references to the inner fields if this is a Node::AirFlight
, otherwise None
Sourcepub fn into_air_flight(self) -> Result<AirFlight, Self>
pub fn into_air_flight(self) -> Result<AirFlight, Self>
Returns the inner fields if this is a Node::AirFlight
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_air_gate(&self) -> bool
pub fn is_air_gate(&self) -> bool
Returns true if this is a Node::AirGate
, otherwise false
Sourcepub fn as_air_gate_mut(&mut self) -> Option<&mut AirGate>
pub fn as_air_gate_mut(&mut self) -> Option<&mut AirGate>
Optionally returns mutable references to the inner fields if this is a Node::AirGate
, otherwise None
Sourcepub fn as_air_gate(&self) -> Option<&AirGate>
pub fn as_air_gate(&self) -> Option<&AirGate>
Optionally returns references to the inner fields if this is a Node::AirGate
, otherwise None
Sourcepub fn into_air_gate(self) -> Result<AirGate, Self>
pub fn into_air_gate(self) -> Result<AirGate, Self>
Returns the inner fields if this is a Node::AirGate
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_bus_company(&self) -> bool
pub fn is_bus_company(&self) -> bool
Returns true if this is a Node::BusCompany
, otherwise false
Sourcepub fn as_bus_company_mut(&mut self) -> Option<&mut BusCompany>
pub fn as_bus_company_mut(&mut self) -> Option<&mut BusCompany>
Optionally returns mutable references to the inner fields if this is a Node::BusCompany
, otherwise None
Sourcepub fn as_bus_company(&self) -> Option<&BusCompany>
pub fn as_bus_company(&self) -> Option<&BusCompany>
Optionally returns references to the inner fields if this is a Node::BusCompany
, otherwise None
Sourcepub fn into_bus_company(self) -> Result<BusCompany, Self>
pub fn into_bus_company(self) -> Result<BusCompany, Self>
Returns the inner fields if this is a Node::BusCompany
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_bus_line(&self) -> bool
pub fn is_bus_line(&self) -> bool
Returns true if this is a Node::BusLine
, otherwise false
Sourcepub fn as_bus_line_mut(&mut self) -> Option<&mut BusLine>
pub fn as_bus_line_mut(&mut self) -> Option<&mut BusLine>
Optionally returns mutable references to the inner fields if this is a Node::BusLine
, otherwise None
Sourcepub fn as_bus_line(&self) -> Option<&BusLine>
pub fn as_bus_line(&self) -> Option<&BusLine>
Optionally returns references to the inner fields if this is a Node::BusLine
, otherwise None
Sourcepub fn into_bus_line(self) -> Result<BusLine, Self>
pub fn into_bus_line(self) -> Result<BusLine, Self>
Returns the inner fields if this is a Node::BusLine
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_bus_stop(&self) -> bool
pub fn is_bus_stop(&self) -> bool
Returns true if this is a Node::BusStop
, otherwise false
Sourcepub fn as_bus_stop_mut(&mut self) -> Option<&mut BusStop>
pub fn as_bus_stop_mut(&mut self) -> Option<&mut BusStop>
Optionally returns mutable references to the inner fields if this is a Node::BusStop
, otherwise None
Sourcepub fn as_bus_stop(&self) -> Option<&BusStop>
pub fn as_bus_stop(&self) -> Option<&BusStop>
Optionally returns references to the inner fields if this is a Node::BusStop
, otherwise None
Sourcepub fn into_bus_stop(self) -> Result<BusStop, Self>
pub fn into_bus_stop(self) -> Result<BusStop, Self>
Returns the inner fields if this is a Node::BusStop
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_sea_company(&self) -> bool
pub fn is_sea_company(&self) -> bool
Returns true if this is a Node::SeaCompany
, otherwise false
Sourcepub fn as_sea_company_mut(&mut self) -> Option<&mut SeaCompany>
pub fn as_sea_company_mut(&mut self) -> Option<&mut SeaCompany>
Optionally returns mutable references to the inner fields if this is a Node::SeaCompany
, otherwise None
Sourcepub fn as_sea_company(&self) -> Option<&SeaCompany>
pub fn as_sea_company(&self) -> Option<&SeaCompany>
Optionally returns references to the inner fields if this is a Node::SeaCompany
, otherwise None
Sourcepub fn into_sea_company(self) -> Result<SeaCompany, Self>
pub fn into_sea_company(self) -> Result<SeaCompany, Self>
Returns the inner fields if this is a Node::SeaCompany
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_sea_line(&self) -> bool
pub fn is_sea_line(&self) -> bool
Returns true if this is a Node::SeaLine
, otherwise false
Sourcepub fn as_sea_line_mut(&mut self) -> Option<&mut SeaLine>
pub fn as_sea_line_mut(&mut self) -> Option<&mut SeaLine>
Optionally returns mutable references to the inner fields if this is a Node::SeaLine
, otherwise None
Sourcepub fn as_sea_line(&self) -> Option<&SeaLine>
pub fn as_sea_line(&self) -> Option<&SeaLine>
Optionally returns references to the inner fields if this is a Node::SeaLine
, otherwise None
Sourcepub fn into_sea_line(self) -> Result<SeaLine, Self>
pub fn into_sea_line(self) -> Result<SeaLine, Self>
Returns the inner fields if this is a Node::SeaLine
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_sea_stop(&self) -> bool
pub fn is_sea_stop(&self) -> bool
Returns true if this is a Node::SeaStop
, otherwise false
Sourcepub fn as_sea_stop_mut(&mut self) -> Option<&mut SeaStop>
pub fn as_sea_stop_mut(&mut self) -> Option<&mut SeaStop>
Optionally returns mutable references to the inner fields if this is a Node::SeaStop
, otherwise None
Sourcepub fn as_sea_stop(&self) -> Option<&SeaStop>
pub fn as_sea_stop(&self) -> Option<&SeaStop>
Optionally returns references to the inner fields if this is a Node::SeaStop
, otherwise None
Sourcepub fn into_sea_stop(self) -> Result<SeaStop, Self>
pub fn into_sea_stop(self) -> Result<SeaStop, Self>
Returns the inner fields if this is a Node::SeaStop
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_rail_company(&self) -> bool
pub fn is_rail_company(&self) -> bool
Returns true if this is a Node::RailCompany
, otherwise false
Sourcepub fn as_rail_company_mut(&mut self) -> Option<&mut RailCompany>
pub fn as_rail_company_mut(&mut self) -> Option<&mut RailCompany>
Optionally returns mutable references to the inner fields if this is a Node::RailCompany
, otherwise None
Sourcepub fn as_rail_company(&self) -> Option<&RailCompany>
pub fn as_rail_company(&self) -> Option<&RailCompany>
Optionally returns references to the inner fields if this is a Node::RailCompany
, otherwise None
Sourcepub fn into_rail_company(self) -> Result<RailCompany, Self>
pub fn into_rail_company(self) -> Result<RailCompany, Self>
Returns the inner fields if this is a Node::RailCompany
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_rail_line(&self) -> bool
pub fn is_rail_line(&self) -> bool
Returns true if this is a Node::RailLine
, otherwise false
Sourcepub fn as_rail_line_mut(&mut self) -> Option<&mut RailLine>
pub fn as_rail_line_mut(&mut self) -> Option<&mut RailLine>
Optionally returns mutable references to the inner fields if this is a Node::RailLine
, otherwise None
Sourcepub fn as_rail_line(&self) -> Option<&RailLine>
pub fn as_rail_line(&self) -> Option<&RailLine>
Optionally returns references to the inner fields if this is a Node::RailLine
, otherwise None
Sourcepub fn into_rail_line(self) -> Result<RailLine, Self>
pub fn into_rail_line(self) -> Result<RailLine, Self>
Returns the inner fields if this is a Node::RailLine
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_rail_station(&self) -> bool
pub fn is_rail_station(&self) -> bool
Returns true if this is a Node::RailStation
, otherwise false
Sourcepub fn as_rail_station_mut(&mut self) -> Option<&mut RailStation>
pub fn as_rail_station_mut(&mut self) -> Option<&mut RailStation>
Optionally returns mutable references to the inner fields if this is a Node::RailStation
, otherwise None
Sourcepub fn as_rail_station(&self) -> Option<&RailStation>
pub fn as_rail_station(&self) -> Option<&RailStation>
Optionally returns references to the inner fields if this is a Node::RailStation
, otherwise None
Sourcepub fn into_rail_station(self) -> Result<RailStation, Self>
pub fn into_rail_station(self) -> Result<RailStation, Self>
Returns the inner fields if this is a Node::RailStation
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn is_spawn_warp(&self) -> bool
pub fn is_spawn_warp(&self) -> bool
Returns true if this is a Node::SpawnWarp
, otherwise false
Sourcepub fn as_spawn_warp_mut(&mut self) -> Option<&mut SpawnWarp>
pub fn as_spawn_warp_mut(&mut self) -> Option<&mut SpawnWarp>
Optionally returns mutable references to the inner fields if this is a Node::SpawnWarp
, otherwise None
Sourcepub fn as_spawn_warp(&self) -> Option<&SpawnWarp>
pub fn as_spawn_warp(&self) -> Option<&SpawnWarp>
Optionally returns references to the inner fields if this is a Node::SpawnWarp
, otherwise None
Sourcepub fn into_spawn_warp(self) -> Result<SpawnWarp, Self>
pub fn into_spawn_warp(self) -> Result<SpawnWarp, Self>
Returns the inner fields if this is a Node::SpawnWarp
, otherwise returns back the enum in the Err
case of the result
Sourcepub fn as_town_mut(&mut self) -> Option<&mut Town>
pub fn as_town_mut(&mut self) -> Option<&mut Town>
Optionally returns mutable references to the inner fields if this is a Node::Town
, otherwise None