[−][src]Trait cardpack::fluent::named::Named
Required methods
Loading content...Provided methods
fn fluent_value(&self, key_section: &str, lid: &LanguageIdentifier) -> String
This is the core method for getting fluent values. the index, long, and default weight methods are all just methods simplifying the call to this method.
fn index(&self, lid: &LanguageIdentifier) -> String
Returns the value of the names' index in the fluent templates.
The index is defined as the identity indicator in the corner of a playing card.
Usage
use cardpack::fluent::named::*; use cardpack::fluent::fluent_name::*; let jack = FluentName::new("jack"); println!("{}", jack.index(&GERMAN));
Prints out B
(for Bube).
fn index_default(&self) -> String
Returns the default, US_ENGLISH value of the names' index value in the fluent templates.
Usage
use cardpack::fluent::named::*; use cardpack::fluent::fluent_name::*; let ten = FluentName::new("ten"); println!("{}", ten.index_default());
Prints out T
.
fn long(&self, lid: &LanguageIdentifier) -> String
Returns the value of the names' long value in the fluent templates.
Usage
use cardpack::fluent::named::*; use cardpack::fluent::fluent_name::*; let queen = FluentName::new("big-joker"); println!("{}", queen.long(&GERMAN));
Prints out Großer Joker
.
fn long_default(&self) -> String
Returns the default, US_ENGLISH value of the names' long value in the fluent templates.
fn default_weight(&self) -> isize
Returns the default weight for a name. Weight is used to sort cards.