struct ReferenceDisplay<'a>(&'a Lifetime, &'a Mutability);
Expand description
An fmt::Display
type for formatting Rust references.
§Examples
ⓘ
let lifetime = Lifetime::from(&syn::parse_str::<syn::Lifetime>("'a"));
let mutability = Mutability::Mutable;
// ...
let fmt = format!("{}[u8]", ReferenceDisplay(&lifetime, &mutability));
assert_eq!(fmt, "&'a mut [u8]");
Tuple Fields§
§0: &'a Lifetime
§1: &'a Mutability
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for ReferenceDisplay<'a>
impl<'a> RefUnwindSafe for ReferenceDisplay<'a>
impl<'a> Send for ReferenceDisplay<'a>
impl<'a> Sync for ReferenceDisplay<'a>
impl<'a> Unpin for ReferenceDisplay<'a>
impl<'a> UnwindSafe for ReferenceDisplay<'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