[][src]Struct logdna_client::body::LineBuilder

pub struct LineBuilder { /* fields omitted */ }

Used to build a log line

Example

Line::builder()
   .line("this is a test")
   .app("rust-client")
   .level("INFO")
   .build()
   .expect("Line::builder()");

Methods

impl LineBuilder[src]

pub fn new() -> Self[src]

Creates a new line builder

pub fn app<T: Into<String>>(self, app: T) -> Self[src]

Set the app field in the builder

pub fn env<T: Into<String>>(self, env: T) -> Self[src]

Set the env field in the builder

pub fn file<T: Into<String>>(self, file: T) -> Self[src]

Set the file field in the builder

pub fn labels<T: Into<KeyValueMap>>(self, labels: T) -> Self[src]

Set the level field in the builder

pub fn level<T: Into<String>>(self, level: T) -> Self[src]

Set the level field in the builder

pub fn line<T: Into<String>>(self, line: T) -> Self[src]

Set the line field in the builder

pub fn build(self) -> Result<Line, LineError>[src]

Construct a log line from the contents of this builder

Returning an error if required fields are missing

Auto Trait Implementations

impl Send for LineBuilder

impl Sync for LineBuilder

Blanket Implementations

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

impl<T> From<T> for 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.

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

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

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

impl<T> Erased for T