[−][src]Struct rustc_symbol_mangling::v0::SymbolMangler
Fields
tcx: TyCtxt<'tcx>compress: Option<Box<CompressionCaches<'tcx>>>binders: Vec<BinderLevel>out: StringImplementations
impl<'tcx> SymbolMangler<'tcx>[src]
pub(in v0) fn push(
&mut self,
s: &str
)[src]
&mut self,
s: &str
)
pub(in v0) fn push_integer_62(
&mut self,
x: u64
)[src]
&mut self,
x: u64
)
Push a _-terminated base 62 integer, using the format
specified in the RFC as <base-62-number>, that is:
x = 0is encoded as just the"_"terminatorx > 0is encoded asx - 1in base 62, followed by"_", e.g.1becomes"0_",62becomes"Z_", etc.
pub(in v0) fn push_opt_integer_62(
&mut self,
tag: &str,
x: u64
)[src]
&mut self,
tag: &str,
x: u64
)
Push a tag-prefixed base 62 integer, when larger than 0, that is:
x = 0is encoded as""(nothing)x > 0is encoded as thetagfollowed bypush_integer_62(x - 1)e.g.1becomestag + "_",2becomestag + "0_", etc.
pub(in v0) fn push_disambiguator(
&mut self,
dis: u64
)[src]
&mut self,
dis: u64
)
pub(in v0) fn push_ident(
&mut self,
ident: &str
)[src]
&mut self,
ident: &str
)
pub(in v0) fn path_append_ns(
self,
print_prefix: impl FnOnce(Self) -> Result<Self, !>,
ns: char,
disambiguator: u64,
name: &str
) -> Result<Self, !>[src]
self,
print_prefix: impl FnOnce(Self) -> Result<Self, !>,
ns: char,
disambiguator: u64,
name: &str
) -> Result<Self, !>
pub(in v0) fn print_backref(
self,
i: usize
) -> Result<Self, !>[src]
self,
i: usize
) -> Result<Self, !>
pub(in v0) fn in_binder<T>(
self,
value: &Binder<T>,
print_value: impl FnOnce(Self, &T) -> Result<Self, !>
) -> Result<Self, !> where
T: TypeFoldable<'tcx>, [src]
self,
value: &Binder<T>,
print_value: impl FnOnce(Self, &T) -> Result<Self, !>
) -> Result<Self, !> where
T: TypeFoldable<'tcx>,
Trait Implementations
impl<'tcx> Printer<'tcx> for SymbolMangler<'tcx>[src]
type Error = !
type Path = Self
type Region = Self
type Type = Self
type DynExistential = Self
type Const = Self
pub fn tcx(&self) -> TyCtxt<'tcx>[src]
pub fn print_def_path(
self,
def_id: DefId,
substs: &'tcx [GenericArg<'tcx>]
) -> Result<Self::Path, Self::Error>[src]
self,
def_id: DefId,
substs: &'tcx [GenericArg<'tcx>]
) -> Result<Self::Path, Self::Error>
pub fn print_impl_path(
self,
impl_def_id: DefId,
substs: &'tcx [GenericArg<'tcx>],
self_ty: Ty<'tcx>,
impl_trait_ref: Option<TraitRef<'tcx>>
) -> Result<Self::Path, Self::Error>[src]
self,
impl_def_id: DefId,
substs: &'tcx [GenericArg<'tcx>],
self_ty: Ty<'tcx>,
impl_trait_ref: Option<TraitRef<'tcx>>
) -> Result<Self::Path, Self::Error>
pub fn print_region(
self,
region: Region<'_>
) -> Result<Self::Region, Self::Error>[src]
self,
region: Region<'_>
) -> Result<Self::Region, Self::Error>
pub fn print_type(self, ty: Ty<'tcx>) -> Result<Self::Type, Self::Error>[src]
pub fn print_dyn_existential(
self,
predicates: &'tcx List<ExistentialPredicate<'tcx>>
) -> Result<Self::DynExistential, Self::Error>[src]
self,
predicates: &'tcx List<ExistentialPredicate<'tcx>>
) -> Result<Self::DynExistential, Self::Error>
pub fn print_const(
self,
ct: &'tcx Const<'tcx>
) -> Result<Self::Const, Self::Error>[src]
self,
ct: &'tcx Const<'tcx>
) -> Result<Self::Const, Self::Error>
pub fn path_crate(self, cnum: CrateNum) -> Result<Self::Path, Self::Error>[src]
pub fn path_qualified(
self,
self_ty: Ty<'tcx>,
trait_ref: Option<TraitRef<'tcx>>
) -> Result<Self::Path, Self::Error>[src]
self,
self_ty: Ty<'tcx>,
trait_ref: Option<TraitRef<'tcx>>
) -> Result<Self::Path, Self::Error>
pub fn path_append_impl(
self,
_: impl FnOnce(Self) -> Result<Self::Path, Self::Error>,
_: &DisambiguatedDefPathData,
_: Ty<'tcx>,
_: Option<TraitRef<'tcx>>
) -> Result<Self::Path, Self::Error>[src]
self,
_: impl FnOnce(Self) -> Result<Self::Path, Self::Error>,
_: &DisambiguatedDefPathData,
_: Ty<'tcx>,
_: Option<TraitRef<'tcx>>
) -> Result<Self::Path, Self::Error>
pub fn path_append(
self,
print_prefix: impl FnOnce(Self) -> Result<Self::Path, Self::Error>,
disambiguated_data: &DisambiguatedDefPathData
) -> Result<Self::Path, Self::Error>[src]
self,
print_prefix: impl FnOnce(Self) -> Result<Self::Path, Self::Error>,
disambiguated_data: &DisambiguatedDefPathData
) -> Result<Self::Path, Self::Error>
pub fn path_generic_args(
self,
print_prefix: impl FnOnce(Self) -> Result<Self::Path, Self::Error>,
args: &[GenericArg<'tcx>]
) -> Result<Self::Path, Self::Error>[src]
self,
print_prefix: impl FnOnce(Self) -> Result<Self::Path, Self::Error>,
args: &[GenericArg<'tcx>]
) -> Result<Self::Path, Self::Error>
pub fn default_print_def_path(
self,
def_id: DefId,
substs: &'tcx [GenericArg<'tcx>]
) -> Result<Self::Path, Self::Error>[src]
self,
def_id: DefId,
substs: &'tcx [GenericArg<'tcx>]
) -> Result<Self::Path, Self::Error>
pub fn generic_args_to_print(
&self,
generics: &'tcx Generics,
substs: &'tcx [GenericArg<'tcx>]
) -> &'tcx [GenericArg<'tcx>][src]
&self,
generics: &'tcx Generics,
substs: &'tcx [GenericArg<'tcx>]
) -> &'tcx [GenericArg<'tcx>]
pub fn default_print_impl_path(
self,
impl_def_id: DefId,
_substs: &'tcx [GenericArg<'tcx>],
self_ty: &'tcx TyS<'tcx>,
impl_trait_ref: Option<TraitRef<'tcx>>
) -> Result<Self::Path, Self::Error>[src]
self,
impl_def_id: DefId,
_substs: &'tcx [GenericArg<'tcx>],
self_ty: &'tcx TyS<'tcx>,
impl_trait_ref: Option<TraitRef<'tcx>>
) -> Result<Self::Path, Self::Error>
Auto Trait Implementations
impl<'tcx> !RefUnwindSafe for SymbolMangler<'tcx>
impl<'tcx> !Send for SymbolMangler<'tcx>
impl<'tcx> !Sync for SymbolMangler<'tcx>
impl<'tcx> Unpin for SymbolMangler<'tcx>
impl<'tcx> !UnwindSafe for SymbolMangler<'tcx>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,