pub struct StringifierState {
pub opts: *mut ToStringOptions,
pub result: *mut ToStringResult,
pub cycle_names: DenseHashMap<TypeId, String>,
pub cycle_tp_names: DenseHashMap<TypePackId, String>,
pub seen: Set<*mut c_void>,
pub used_names: DenseHashSet<String>,
pub indentation: usize,
pub exhaustive: bool,
pub ignore_synthetic_name: bool,
pub previous_name_index: i32,
}Fields§
§opts: *mut ToStringOptions§result: *mut ToStringResult§cycle_names: DenseHashMap<TypeId, String>§cycle_tp_names: DenseHashMap<TypePackId, String>§seen: Set<*mut c_void>§used_names: DenseHashSet<String>§indentation: usize§exhaustive: bool§ignore_synthetic_name: bool§previous_name_index: i32Implementations§
Source§impl StringifierState
impl StringifierState
Sourcepub fn emit_and_record_span(&mut self, s: &str, ty: TypeId)
pub fn emit_and_record_span(&mut self, s: &str, ty: TypeId)
C++ void emitAndRecordSpan(const std::string& s, TypeId ty).
Source§impl StringifierState
impl StringifierState
pub fn emit_indentation(&mut self)
Source§impl StringifierState
impl StringifierState
Sourcepub fn emit_level(&mut self, scope: *mut Scope)
pub fn emit_level(&mut self, scope: *mut Scope)
C++ void emitLevel(Scope* scope).
Source§impl StringifierState
impl StringifierState
pub fn emit_string(&mut self, s: &str)
Source§impl StringifierState
impl StringifierState
Sourcepub fn emit_type_level(&mut self, level: TypeLevel)
pub fn emit_type_level(&mut self, level: TypeLevel)
C++ void emit(TypeLevel level).
Source§impl StringifierState
impl StringifierState
pub fn emit_c_char(&mut self, s: *const c_char)
Source§impl StringifierState
impl StringifierState
pub fn emit_usize(&mut self, i: usize)
Source§impl StringifierState
impl StringifierState
pub fn emit_polarity(&mut self, p: Polarity)
Source§impl StringifierState
impl StringifierState
Sourcepub fn get_name_type_id(&mut self, ty: TypeId) -> String
pub fn get_name_type_id(&mut self, ty: TypeId) -> String
C++ std::string getName(TypeId ty).
Source§impl StringifierState
impl StringifierState
Sourcepub fn get_name_type_pack_id(&mut self, ty: TypePackId) -> String
pub fn get_name_type_pack_id(&mut self, ty: TypePackId) -> String
C++ std::string getName(TypePackId ty).
Source§impl StringifierState
impl StringifierState
Sourcepub fn stringifier_state_stringifier_state(
opts: *mut ToStringOptions,
result: *mut ToStringResult,
) -> Self
pub fn stringifier_state_stringifier_state( opts: *mut ToStringOptions, result: *mut ToStringResult, ) -> Self
C++ StringifierState(ToStringOptions& opts, ToStringResult& result).
The C++ reference members are raw pointers in the record; callers keep
opts/result alive for the state’s lifetime (as in C++).
Trait Implementations§
Source§impl Clone for StringifierState
impl Clone for StringifierState
Source§fn clone(&self) -> StringifierState
fn clone(&self) -> StringifierState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !Send for StringifierState
impl !Sync for StringifierState
impl Freeze for StringifierState
impl RefUnwindSafe for StringifierState
impl Unpin for StringifierState
impl UnsafeUnpin for StringifierState
impl UnwindSafe for StringifierState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more