Rewrite

Struct Rewrite 

Source
pub struct Rewrite<T: Rewritable> { /* private fields */ }

Implementations§

Source§

impl<T: Rewritable> Rewrite<T>
where <T::Ref as ToOwned>::Owned: Default,

Source

pub fn new(input: T) -> Self

Source§

impl<T: Rewritable<Ref = str>> Rewrite<T>

Source

pub fn push(&mut self, c: char)

Source

pub fn push_str(&mut self, s: &str)

Trait Implementations§

Source§

impl<'a, 'b> From<Rewrite<&'b Cow<'a, str>>> for Cow<'a, str>

Source§

fn from(this: Rewrite<&'b Cow<'a, str>>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Rewrite<&'a str>> for Cow<'a, str>

Source§

fn from(this: Rewrite<&'a str>) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<Rewrite<Cow<'a, str>>> for Cow<'a, str>

Source§

fn from(this: Rewrite<Cow<'a, str>>) -> Self

Converts to this type from the input type.
Source§

impl From<Rewrite<String>> for String

Source§

fn from(this: Rewrite<String>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<T> Freeze for Rewrite<T>
where T: Freeze, <<T as Rewritable>::Ref as ToOwned>::Owned: Freeze, <<T as Rewritable>::Ref as WithInfo>::Info: Freeze,

§

impl<T> RefUnwindSafe for Rewrite<T>
where T: RefUnwindSafe, <<T as Rewritable>::Ref as ToOwned>::Owned: RefUnwindSafe, <<T as Rewritable>::Ref as WithInfo>::Info: RefUnwindSafe,

§

impl<T> Send for Rewrite<T>
where T: Send, <<T as Rewritable>::Ref as ToOwned>::Owned: Send, <<T as Rewritable>::Ref as WithInfo>::Info: Send,

§

impl<T> Sync for Rewrite<T>
where T: Sync, <<T as Rewritable>::Ref as ToOwned>::Owned: Sync, <<T as Rewritable>::Ref as WithInfo>::Info: Sync,

§

impl<T> Unpin for Rewrite<T>
where T: Unpin, <<T as Rewritable>::Ref as ToOwned>::Owned: Unpin, <<T as Rewritable>::Ref as WithInfo>::Info: Unpin,

§

impl<T> UnwindSafe for Rewrite<T>
where T: UnwindSafe, <<T as Rewritable>::Ref as ToOwned>::Owned: UnwindSafe, <<T as Rewritable>::Ref as WithInfo>::Info: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.