pub struct SettlementEntry { /* private fields */ }Expand description
A settlement of the campaign (start_pos_settlements).
Implementations§
Source§impl SettlementEntry
impl SettlementEntry
Sourcepub fn primary_building(&self) -> &String
pub fn primary_building(&self) -> &String
Primary building level key.
Sourcepub fn port_building(&self) -> &String
pub fn port_building(&self) -> &String
Port building level key, empty without port.
Sourcepub fn buildings(&self) -> &Vec<String>
pub fn buildings(&self) -> &Vec<String>
Other building level keys (building1 to building5), without the empty ones.
Sourcepub fn slave_points(&self) -> &i64
pub fn slave_points(&self) -> &i64
Slave points the settlement starts with.
Source§impl SettlementEntry
impl SettlementEntry
Sourcepub fn is_major(&self) -> bool
pub fn is_major(&self) -> bool
Returns if the settlement is a major one (its primary building is a [MAJOR_SETTLEMENT_INSTANCE]). Major
settlements have walls and are the main region of their province.
Sourcepub fn all_buildings(&self) -> impl Iterator<Item = &str>
pub fn all_buildings(&self) -> impl Iterator<Item = &str>
Returns every building level of the settlement: primary, port (if any) and the others, in that order.
Trait Implementations§
Source§impl Clone for SettlementEntry
impl Clone for SettlementEntry
Source§fn clone(&self) -> SettlementEntry
fn clone(&self) -> SettlementEntry
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 moreSource§impl Debug for SettlementEntry
impl Debug for SettlementEntry
Source§impl Default for SettlementEntry
impl Default for SettlementEntry
Source§fn default() -> SettlementEntry
fn default() -> SettlementEntry
Returns the “default value” for a type. Read more
Source§impl PartialEq for SettlementEntry
impl PartialEq for SettlementEntry
impl StructuralPartialEq for SettlementEntry
Auto Trait Implementations§
impl Freeze for SettlementEntry
impl RefUnwindSafe for SettlementEntry
impl Send for SettlementEntry
impl Sync for SettlementEntry
impl Unpin for SettlementEntry
impl UnsafeUnpin for SettlementEntry
impl UnwindSafe for SettlementEntry
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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 moreimpl<T> MaybeSend for T
impl<T> MaybeSync for T
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().impl<T> Scalar for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.