[−][src]Struct logdna_client::body::LineBuilder
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]
U: From<T>,
impl<T> From<T> for T
[src]
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,