enum Vassal {
Character(Shared<GameObjectEntity<Character>>),
Reference(Shared<Option<Shared<GameObjectEntity<Character>>>>),
}
Expand description
An enum that holds either a character or a reference to a character. Effectively either a vassal(Character) or a vassal contract. This is done so that we can hold a reference to a vassal contract, and also manually added characters from vassals registering themselves via Character::add_vassal.
Variants§
Character(Shared<GameObjectEntity<Character>>)
Reference(Shared<Option<Shared<GameObjectEntity<Character>>>>)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Vassal
impl !RefUnwindSafe for Vassal
impl !Send for Vassal
impl !Sync for Vassal
impl Unpin for Vassal
impl !UnwindSafe for Vassal
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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