Struct ra_ap_hir_ty::display::HirFormatter
source · pub struct HirFormatter<'a> {
pub db: &'a dyn HirDatabase,
pub entity_limit: Option<usize>,
/* private fields */
}
Fields§
§db: &'a dyn HirDatabase
§entity_limit: Option<usize>
Implementations§
source§impl HirFormatter<'_>
impl HirFormatter<'_>
pub fn write_joined<T: HirDisplay>( &mut self, iter: impl IntoIterator<Item = T>, sep: &str ) -> Result<(), HirDisplayError>
sourcepub fn write_fmt(&mut self, args: Arguments<'_>) -> Result<(), HirDisplayError>
pub fn write_fmt(&mut self, args: Arguments<'_>) -> Result<(), HirDisplayError>
This allows using the write!
macro directly with a HirFormatter
.
pub fn write_str(&mut self, s: &str) -> Result<(), HirDisplayError>
pub fn write_char(&mut self, c: char) -> Result<(), HirDisplayError>
pub fn should_truncate(&self) -> bool
pub fn omit_verbose_types(&self) -> bool
Auto Trait Implementations§
impl<'a> Freeze for HirFormatter<'a>
impl<'a> !RefUnwindSafe for HirFormatter<'a>
impl<'a> !Send for HirFormatter<'a>
impl<'a> !Sync for HirFormatter<'a>
impl<'a> Unpin for HirFormatter<'a>
impl<'a> !UnwindSafe for HirFormatter<'a>
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
source§impl<T> Cast for T
impl<T> Cast for T
source§fn cast<U>(self, interner: <U as HasInterner>::Interner) -> Uwhere
Self: CastTo<U>,
U: HasInterner,
fn cast<U>(self, interner: <U as HasInterner>::Interner) -> Uwhere
Self: CastTo<U>,
U: HasInterner,
Cast a value to type
U
using CastTo
.