[−][src]Struct shoebill::Renderable
Renderable
is a separate thing so that we can use it with
format! and write! style macros. This has two lifetimes so that you can have multiple
Renderable
structs in one scope as long as their lifetimes don't overlap. If we ONLY had
the <'p> lifetime, we wouldn't be able to do something like:
//let s1 = format!("{}", d1.render(printer)); //let s2 = format!("{}", d2.render(printer));
without getting an error that printer was still borrwed by the first statement, since the borrow by render would be believed to have duration <'p>
Trait Implementations
impl<'x, 'p: 'x, P: HasPrinter<'p>> Display for Renderable<'x, 'p, P>
[src]
By implementing this as an instance of Display
for Renderable
,
you can render something directly to some sink (as a Formatter
)
without having to build the actual string first and then write it.
Auto Trait Implementations
impl<'x, 'p, P> RefUnwindSafe for Renderable<'x, 'p, P> where
P: RefUnwindSafe,
P: RefUnwindSafe,
impl<'x, 'p, P> Send for Renderable<'x, 'p, P> where
P: Sync,
P: Sync,
impl<'x, 'p, P> Sync for Renderable<'x, 'p, P> where
P: Sync,
P: Sync,
impl<'x, 'p, P> Unpin for Renderable<'x, 'p, P>
impl<'x, 'p, P> UnwindSafe for Renderable<'x, 'p, P> where
P: RefUnwindSafe,
P: RefUnwindSafe,
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,
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> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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.
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>,