Struct ft::FromTo

source ·
pub struct FromTo {
    pub tf: HashMap<Lang, Lang>,
    pub ft: HashMap<Lang, Vec<Lang>>,
    pub default_from: Option<Lang>,
}

Fields§

§tf: HashMap<Lang, Lang>§ft: HashMap<Lang, Vec<Lang>>§default_from: Option<Lang>

Implementations§

source§

impl FromTo

source

pub fn root(&self) -> Option<Lang>

source

pub fn has_to_li(&self, lang: Lang) -> bool

source

pub fn to_li(&self, lang: Lang) -> Option<Box<[Lang]>>

source

pub fn from<T: TryInto<Lang>>(&self, lang: T) -> Option<Lang>
where <T as TryInto<Lang>>::Error: Display,

source

pub fn root_all_lang_li(&self) -> Vec<Lang>

source

pub fn all_lang_li(&self) -> Vec<Lang>

source

pub fn all_lang_set(&self) -> HashSet<Lang>

source

pub fn from_lang_li(&self) -> Vec<Lang>

source

pub fn add(&mut self, from: u16, to_set: HashSet<u16>)

Trait Implementations§

source§

impl Debug for FromTo

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for FromTo

source§

fn default() -> FromTo

Returns the “default value” for a type. Read more
source§

impl From<&HashMap<String, String>> for FromTo

source§

fn from(value: &HashMap<String, String>) -> Self

Converts to this type from the input type.
source§

impl From<Vec<(u16, Vec<u16>)>> for FromTo

source§

fn from(from_to: Vec<(u16, Vec<u16>)>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for FromTo

§

impl RefUnwindSafe for FromTo

§

impl Send for FromTo

§

impl Sync for FromTo

§

impl Unpin for FromTo

§

impl UnwindSafe for FromTo

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more