pub enum Title {
Empire(TitleData),
Kingdom(TitleData),
Duchy(TitleData),
County {
data: TitleData,
culture: Option<Shared<GameObjectEntity<Culture>>>,
faith: Option<Shared<GameObjectEntity<Faith>>>,
},
Barony(TitleData),
Other(TitleData),
}
Variants§
Empire(TitleData)
Kingdom(TitleData)
Duchy(TitleData)
County
Fields
§
culture: Option<Shared<GameObjectEntity<Culture>>>
§
faith: Option<Shared<GameObjectEntity<Faith>>>
Barony(TitleData)
Other(TitleData)
Implementations§
Source§impl Title
impl Title
Sourcepub fn add_jure_vassal(&mut self, vassal: Shared<GameObjectEntity<Title>>)
pub fn add_jure_vassal(&mut self, vassal: Shared<GameObjectEntity<Title>>)
Adds a de jure vassal to the title
Sourcepub fn add_facto_vassal(&mut self, vassal: Shared<GameObjectEntity<Title>>)
pub fn add_facto_vassal(&mut self, vassal: Shared<GameObjectEntity<Title>>)
Adds a de facto vassal to the title
Sourcepub fn get_barony_keys(&self) -> Vec<Rc<str>>
pub fn get_barony_keys(&self) -> Vec<Rc<str>>
Recursively gets all the de facto barony keys of the title
pub fn get_de_jure_barony_keys(&self) -> Vec<Rc<str>>
Sourcepub fn get_history_iter(
&self,
) -> Iter<'_, (Date, Option<Shared<GameObjectEntity<Character>>>, Rc<str>)>
pub fn get_history_iter( &self, ) -> Iter<'_, (Date, Option<Shared<GameObjectEntity<Character>>>, Rc<str>)>
Returns an iterator over the history of the title
Sourcepub fn get_capital(&self) -> Option<Shared<GameObjectEntity<Title>>>
pub fn get_capital(&self) -> Option<Shared<GameObjectEntity<Title>>>
Returns the capital of the title
Sourcepub fn get_holder(&self) -> Option<Shared<GameObjectEntity<Character>>>
pub fn get_holder(&self) -> Option<Shared<GameObjectEntity<Character>>>
Returns the holder of the title
Trait Implementations§
Source§impl FromGameObject for Title
impl FromGameObject for Title
fn from_game_object( base: &HashMap<String, SaveFileValue>, game_state: &mut GameState, ) -> Result<Self, ParsingError>
fn finalize(&mut self, reference: &Shared<GameObjectEntity<Title>>)
Source§impl GameObjectDerived for Title
impl GameObjectDerived for Title
Source§impl Localizable for Title
impl Localizable for Title
Source§impl ProceduralPath for Title
impl ProceduralPath for Title
fn get_subdir() -> &'static str
Source§fn get_children(&self) -> Option<Vec<Shared<GameObjectEntity<Title>>>>
fn get_children(&self) -> Option<Vec<Shared<GameObjectEntity<Title>>>>
Returns an iterator over the children of the node
Source§fn get_parent(&self) -> Option<Vec<Shared<GameObjectEntity<Title>>>>
fn get_parent(&self) -> Option<Vec<Shared<GameObjectEntity<Title>>>>
Returns an iterator over the parent of the node
Auto Trait Implementations§
impl Freeze for Title
impl !RefUnwindSafe for Title
impl !Send for Title
impl !Sync for Title
impl Unpin for Title
impl !UnwindSafe for Title
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
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 more