Skip to main content

MaybeQualifiedTwice

Trait MaybeQualifiedTwice 

Source
pub trait MaybeQualifiedTwice {
    // Required method
    fn into_3_parts(self) -> (Option<(Option<DynIden>, DynIden)>, DynIden);
}
Expand description

A name that can be unqualified (foo), qualified once (foo.bar), or twice (foo.bar.baz).

This is mostly a “private” helper trait to provide reusable conversions.

Required Methods§

Source

fn into_3_parts(self) -> (Option<(Option<DynIden>, DynIden)>, DynIden)

Represent a maybe-qualified name as a (foo?, bar?, baz) tuple.

To be precise, it’s actually ((foo?, bar)?, baz) to rule out invalid states like (Some, None, Some).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<S, T, U> MaybeQualifiedTwice for (S, T, U)
where S: IntoIden, T: IntoIden, U: IntoIden,

Fully-qualified from 3 parts (foo.bar.baz).

Implementors§

Source§

impl<T> MaybeQualifiedTwice for T

From 1 or 2 parts (foo or foo.bar).