Struct game_features::LootTree [−][src]
A loot tree based on the lower partial function construct. Each loot tree node has a chance associated with it.
Example: { chance: 5, result: “item1” } { chance: 2, result: “item2” }
Internally this becomes [0,infinite[ -> item1 [5,infinite[ -> item2 maximum = 7 exclusive (that means 6)
Chances will effectively be: [0,4] (5) -> item1 [5,6] (2) -> item2
Implementations
impl<R> LootTree<R>
[src]
Auto Trait Implementations
impl<R> !RefUnwindSafe for LootTree<R>
impl<R> !Send for LootTree<R>
impl<R> !Sync for LootTree<R>
impl<R> Unpin for LootTree<R>
impl<R> !UnwindSafe for LootTree<R>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,