pub struct CurrencyBranchStep {
pub branches: Vec<CurrencyBranch>,
pub default: Vec<CurrencyUnit>,
}Expand description
Валютная награда шага, выбираемая по custom_values персонажа: ветки
проверяются по порядку, первая совпавшая выдаёт свои валюты, иначе default.
Fields§
§branches: Vec<CurrencyBranch>§default: Vec<CurrencyUnit>Implementations§
Source§impl CurrencyBranchStep
impl CurrencyBranchStep
Sourcepub fn evaluate(&self, character: &CharacterState) -> &Vec<CurrencyUnit>
pub fn evaluate(&self, character: &CharacterState) -> &Vec<CurrencyUnit>
Resolve the step against the character’s custom_values: first matching
branch wins, otherwise default.
Trait Implementations§
Source§impl Clone for CurrencyBranchStep
impl Clone for CurrencyBranchStep
Source§fn clone(&self) -> CurrencyBranchStep
fn clone(&self) -> CurrencyBranchStep
Returns a copy of the value. Read more
1.0.0 · 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 CurrencyBranchStep
impl Debug for CurrencyBranchStep
Source§impl<'de> Deserialize<'de> for CurrencyBranchStep
impl<'de> Deserialize<'de> for CurrencyBranchStep
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 JsonSchema for CurrencyBranchStep
impl JsonSchema for CurrencyBranchStep
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for CurrencyBranchStep
impl PartialEq for CurrencyBranchStep
Source§impl Serialize for CurrencyBranchStep
impl Serialize for CurrencyBranchStep
Source§impl Tsify for CurrencyBranchStep
impl Tsify for CurrencyBranchStep
const DECL: &'static str = "/**\n * \u{412}\u{430}\u{43b}\u{44e}\u{442}\u{43d}\u{430}\u{44f} \u{43d}\u{430}\u{433}\u{440}\u{430}\u{434}\u{430} \u{448}\u{430}\u{433}\u{430}, \u{432}\u{44b}\u{431}\u{438}\u{440}\u{430}\u{435}\u{43c}\u{430}\u{44f} \u{43f}\u{43e} `custom_values` \u{43f}\u{435}\u{440}\u{441}\u{43e}\u{43d}\u{430}\u{436}\u{430}: \u{432}\u{435}\u{442}\u{43a}\u{438}\n * \u{43f}\u{440}\u{43e}\u{432}\u{435}\u{440}\u{44f}\u{44e}\u{442}\u{441}\u{44f} \u{43f}\u{43e} \u{43f}\u{43e}\u{440}\u{44f}\u{434}\u{43a}\u{443}, \u{43f}\u{435}\u{440}\u{432}\u{430}\u{44f} \u{441}\u{43e}\u{432}\u{43f}\u{430}\u{432}\u{448}\u{430}\u{44f} \u{432}\u{44b}\u{434}\u{430}\u{451}\u{442} \u{441}\u{432}\u{43e}\u{438} \u{432}\u{430}\u{43b}\u{44e}\u{442}\u{44b}, \u{438}\u{43d}\u{430}\u{447}\u{435} `default`.\n */\nexport interface CurrencyBranchStep {\n branches: CurrencyBranch[];\n default: CurrencyUnit[];\n}"
const SERIALIZATION_CONFIG: SerializationConfig
type JsType = JsType
fn into_js(&self) -> Result<Self::JsType, Error>where
Self: Serialize,
fn from_js<T>(js: T) -> Result<Self, Error>
impl Eq for CurrencyBranchStep
impl StructuralPartialEq for CurrencyBranchStep
Auto Trait Implementations§
impl Freeze for CurrencyBranchStep
impl RefUnwindSafe for CurrencyBranchStep
impl Send for CurrencyBranchStep
impl Sync for CurrencyBranchStep
impl Unpin for CurrencyBranchStep
impl UnwindSafe for CurrencyBranchStep
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