Skip to main content

IndexRename

Enum IndexRename 

Source
pub enum IndexRename {
    Base(Ident),
    Pieces(Vec<(RenamePiece, Ident)>),
}
Expand description

WHAT THIS DECLARATION’S MINTED RUST TYPES ARE CALLED — the top-level rename word, in whichever of its two forms it was written.

§The BONES axis, and it never appears in a backend block

These are RUST names: the packages, the vocabularies, the evidence, the selector and the markers this expansion lands in the declaring scope. A skin’s names are IndexBackend’s, and the two never cross — a schema rename that moved a Rust type would make one declaration’s API depend on which backends happened to be compiled in.

The declaration’s OWN struct name is never among them. It is the author’s item, sitting in the author’s file; nothing here renames what somebody wrote.

§Two forms, and they are exclusive for Extension’s reason

The extension word’s precedent, one grammar over: a single fact is a key-value and a structured one is a block, and writing both at one position is refused as a repeat. rename = "ShotSearch" re-bases the WHOLE family; rename(fuse_options = "MyKnobs", …) names individual mints.

Variants§

§

Base(Ident)

rename = "ShotSearch" — the base every minted name is built on, replacing the declaration’s own ident at the head of each.

§

Pieces(Vec<(RenamePiece, Ident)>)

rename(<piece> = "…", …) — one entry per mint the declaration named, in written order.

Implementations§

Source§

impl IndexRename

Source

pub const fn base(&self) -> Option<&Ident>

The BASE this family is built on, or None where the declaration named pieces instead.

Source

pub fn piece(&self, piece: RenamePiece) -> Option<&Ident>

What the declaration called piece, or None where it named that one nothing.

Trait Implementations§

Source§

impl Clone for IndexRename

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for IndexRename

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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.