[][src]Struct simple_string_builder::Builder

pub struct Builder { /* fields omitted */ }

Simple String Builder

Super basic string builder based on my memory of Javas Accepts Strings and &str Some one probobly did this better

Example

let name = "quinn".to_string();
let mut b = Builder::new();
b.append("Hello");
b.append(" My Name Is".to_string());
b.append(format!(" {} and I Like you 😍", name));
let: Result<String, Utf8Error> = b.try_to_string(); 

Methods

impl Builder[src]

pub fn new() -> Self[src]

pub fn append<B: ToBytes>(&mut self, buf: B)[src]

pub fn try_to_string(&self) -> Result<String, Utf8Error>[src]

Try to convert to string fails if bytes don't repersent utf-8

Trait Implementations

impl Debug for Builder[src]

Auto Trait Implementations

impl RefUnwindSafe for Builder

impl Send for Builder

impl Sync for Builder

impl Unpin for Builder

impl UnwindSafe for Builder

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.