Node

Enum Node 

Source
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

Source

pub fn is_air_airline(&self) -> bool

Returns true if this is a Node::AirAirline, otherwise false

Source

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

Source

pub fn as_air_airline(&self) -> Option<&AirAirline>

Optionally returns references to the inner fields if this is a Node::AirAirline, otherwise None

Source

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

Source

pub unsafe fn into_air_airline_unchecked(self) -> AirAirline

Unchecked return of the inner fields of Node::AirAirline.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_air_airline_unchecked(&self) -> &AirAirline

Unchecked reference of the inner fields of Node::AirAirline.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_air_airline_mut_unchecked(&mut self) -> &mut AirAirline

Unchecked mutable reference of the inner fields of Node::AirAirline.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub fn is_air_airport(&self) -> bool

Returns true if this is a Node::AirAirport, otherwise false

Source

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

Source

pub fn as_air_airport(&self) -> Option<&AirAirport>

Optionally returns references to the inner fields if this is a Node::AirAirport, otherwise None

Source

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

Source

pub unsafe fn into_air_airport_unchecked(self) -> AirAirport

Unchecked return of the inner fields of Node::AirAirport.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_air_airport_unchecked(&self) -> &AirAirport

Unchecked reference of the inner fields of Node::AirAirport.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_air_airport_mut_unchecked(&mut self) -> &mut AirAirport

Unchecked mutable reference of the inner fields of Node::AirAirport.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub fn is_air_flight(&self) -> bool

Returns true if this is a Node::AirFlight, otherwise false

Source

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

Source

pub fn as_air_flight(&self) -> Option<&AirFlight>

Optionally returns references to the inner fields if this is a Node::AirFlight, otherwise None

Source

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

Source

pub unsafe fn into_air_flight_unchecked(self) -> AirFlight

Unchecked return of the inner fields of Node::AirFlight.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_air_flight_unchecked(&self) -> &AirFlight

Unchecked reference of the inner fields of Node::AirFlight.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_air_flight_mut_unchecked(&mut self) -> &mut AirFlight

Unchecked mutable reference of the inner fields of Node::AirFlight.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub fn is_air_gate(&self) -> bool

Returns true if this is a Node::AirGate, otherwise false

Source

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

Source

pub fn as_air_gate(&self) -> Option<&AirGate>

Optionally returns references to the inner fields if this is a Node::AirGate, otherwise None

Source

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

Source

pub unsafe fn into_air_gate_unchecked(self) -> AirGate

Unchecked return of the inner fields of Node::AirGate.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_air_gate_unchecked(&self) -> &AirGate

Unchecked reference of the inner fields of Node::AirGate.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_air_gate_mut_unchecked(&mut self) -> &mut AirGate

Unchecked mutable reference of the inner fields of Node::AirGate.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub fn is_bus_company(&self) -> bool

Returns true if this is a Node::BusCompany, otherwise false

Source

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

Source

pub fn as_bus_company(&self) -> Option<&BusCompany>

Optionally returns references to the inner fields if this is a Node::BusCompany, otherwise None

Source

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

Source

pub unsafe fn into_bus_company_unchecked(self) -> BusCompany

Unchecked return of the inner fields of Node::BusCompany.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_bus_company_unchecked(&self) -> &BusCompany

Unchecked reference of the inner fields of Node::BusCompany.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_bus_company_mut_unchecked(&mut self) -> &mut BusCompany

Unchecked mutable reference of the inner fields of Node::BusCompany.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub fn is_bus_line(&self) -> bool

Returns true if this is a Node::BusLine, otherwise false

Source

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

Source

pub fn as_bus_line(&self) -> Option<&BusLine>

Optionally returns references to the inner fields if this is a Node::BusLine, otherwise None

Source

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

Source

pub unsafe fn into_bus_line_unchecked(self) -> BusLine

Unchecked return of the inner fields of Node::BusLine.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_bus_line_unchecked(&self) -> &BusLine

Unchecked reference of the inner fields of Node::BusLine.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_bus_line_mut_unchecked(&mut self) -> &mut BusLine

Unchecked mutable reference of the inner fields of Node::BusLine.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub fn is_bus_stop(&self) -> bool

Returns true if this is a Node::BusStop, otherwise false

Source

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

Source

pub fn as_bus_stop(&self) -> Option<&BusStop>

Optionally returns references to the inner fields if this is a Node::BusStop, otherwise None

Source

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

Source

pub unsafe fn into_bus_stop_unchecked(self) -> BusStop

Unchecked return of the inner fields of Node::BusStop.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_bus_stop_unchecked(&self) -> &BusStop

Unchecked reference of the inner fields of Node::BusStop.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_bus_stop_mut_unchecked(&mut self) -> &mut BusStop

Unchecked mutable reference of the inner fields of Node::BusStop.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub fn is_sea_company(&self) -> bool

Returns true if this is a Node::SeaCompany, otherwise false

Source

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

Source

pub fn as_sea_company(&self) -> Option<&SeaCompany>

Optionally returns references to the inner fields if this is a Node::SeaCompany, otherwise None

Source

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

Source

pub unsafe fn into_sea_company_unchecked(self) -> SeaCompany

Unchecked return of the inner fields of Node::SeaCompany.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_sea_company_unchecked(&self) -> &SeaCompany

Unchecked reference of the inner fields of Node::SeaCompany.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_sea_company_mut_unchecked(&mut self) -> &mut SeaCompany

Unchecked mutable reference of the inner fields of Node::SeaCompany.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub fn is_sea_line(&self) -> bool

Returns true if this is a Node::SeaLine, otherwise false

Source

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

Source

pub fn as_sea_line(&self) -> Option<&SeaLine>

Optionally returns references to the inner fields if this is a Node::SeaLine, otherwise None

Source

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

Source

pub unsafe fn into_sea_line_unchecked(self) -> SeaLine

Unchecked return of the inner fields of Node::SeaLine.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_sea_line_unchecked(&self) -> &SeaLine

Unchecked reference of the inner fields of Node::SeaLine.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_sea_line_mut_unchecked(&mut self) -> &mut SeaLine

Unchecked mutable reference of the inner fields of Node::SeaLine.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub fn is_sea_stop(&self) -> bool

Returns true if this is a Node::SeaStop, otherwise false

Source

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

Source

pub fn as_sea_stop(&self) -> Option<&SeaStop>

Optionally returns references to the inner fields if this is a Node::SeaStop, otherwise None

Source

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

Source

pub unsafe fn into_sea_stop_unchecked(self) -> SeaStop

Unchecked return of the inner fields of Node::SeaStop.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_sea_stop_unchecked(&self) -> &SeaStop

Unchecked reference of the inner fields of Node::SeaStop.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_sea_stop_mut_unchecked(&mut self) -> &mut SeaStop

Unchecked mutable reference of the inner fields of Node::SeaStop.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub fn is_rail_company(&self) -> bool

Returns true if this is a Node::RailCompany, otherwise false

Source

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

Source

pub fn as_rail_company(&self) -> Option<&RailCompany>

Optionally returns references to the inner fields if this is a Node::RailCompany, otherwise None

Source

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

Source

pub unsafe fn into_rail_company_unchecked(self) -> RailCompany

Unchecked return of the inner fields of Node::RailCompany.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_rail_company_unchecked(&self) -> &RailCompany

Unchecked reference of the inner fields of Node::RailCompany.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_rail_company_mut_unchecked(&mut self) -> &mut RailCompany

Unchecked mutable reference of the inner fields of Node::RailCompany.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub fn is_rail_line(&self) -> bool

Returns true if this is a Node::RailLine, otherwise false

Source

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

Source

pub fn as_rail_line(&self) -> Option<&RailLine>

Optionally returns references to the inner fields if this is a Node::RailLine, otherwise None

Source

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

Source

pub unsafe fn into_rail_line_unchecked(self) -> RailLine

Unchecked return of the inner fields of Node::RailLine.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_rail_line_unchecked(&self) -> &RailLine

Unchecked reference of the inner fields of Node::RailLine.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_rail_line_mut_unchecked(&mut self) -> &mut RailLine

Unchecked mutable reference of the inner fields of Node::RailLine.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub fn is_rail_station(&self) -> bool

Returns true if this is a Node::RailStation, otherwise false

Source

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

Source

pub fn as_rail_station(&self) -> Option<&RailStation>

Optionally returns references to the inner fields if this is a Node::RailStation, otherwise None

Source

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

Source

pub unsafe fn into_rail_station_unchecked(self) -> RailStation

Unchecked return of the inner fields of Node::RailStation.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_rail_station_unchecked(&self) -> &RailStation

Unchecked reference of the inner fields of Node::RailStation.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_rail_station_mut_unchecked(&mut self) -> &mut RailStation

Unchecked mutable reference of the inner fields of Node::RailStation.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub fn is_spawn_warp(&self) -> bool

Returns true if this is a Node::SpawnWarp, otherwise false

Source

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

Source

pub fn as_spawn_warp(&self) -> Option<&SpawnWarp>

Optionally returns references to the inner fields if this is a Node::SpawnWarp, otherwise None

Source

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

Source

pub unsafe fn into_spawn_warp_unchecked(self) -> SpawnWarp

Unchecked return of the inner fields of Node::SpawnWarp.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_spawn_warp_unchecked(&self) -> &SpawnWarp

Unchecked reference of the inner fields of Node::SpawnWarp.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_spawn_warp_mut_unchecked(&mut self) -> &mut SpawnWarp

Unchecked mutable reference of the inner fields of Node::SpawnWarp.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub fn is_town(&self) -> bool

Returns true if this is a Node::Town, otherwise false

Source

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

Source

pub fn as_town(&self) -> Option<&Town>

Optionally returns references to the inner fields if this is a Node::Town, otherwise None

Source

pub fn into_town(self) -> Result<Town, Self>

Returns the inner fields if this is a Node::Town, otherwise returns back the enum in the Err case of the result

Source

pub unsafe fn into_town_unchecked(self) -> Town

Unchecked return of the inner fields of Node::Town.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_town_unchecked(&self) -> &Town

Unchecked reference of the inner fields of Node::Town.

§Safety

Results in undefined behavior when it is the incorrect variant.

Source

pub unsafe fn as_town_mut_unchecked(&mut self) -> &mut Town

Unchecked mutable reference of the inner fields of Node::Town.

§Safety

Results in undefined behavior when it is the incorrect variant.

Trait Implementations§

Source§

impl Clone for Node

Source§

fn clone(&self) -> Node

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Node

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Node

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Node

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Node

§

impl RefUnwindSafe for Node

§

impl Send for Node

§

impl Sync for Node

§

impl Unpin for Node

§

impl UnwindSafe for Node

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,