Struct aws_lambda_log_proxy::Sink
source · pub struct Sink(/* private fields */);
Expand description
A sink to write log lines to.
§Caveats
To prevent interleaved output, you should clone a sink instead of creating a new one if you want to write to the same sink.
Implementations§
source§impl Sink
impl Sink
sourcepub fn new(s: impl AsyncWrite + Send + Unpin + 'static) -> Self
pub fn new(s: impl AsyncWrite + Send + Unpin + 'static) -> Self
Create a new sink from an AsyncWrite
implementor.
sourcepub async fn write_line(&self, s: String)
pub async fn write_line(&self, s: String)
Write a string to the sink then write a newline('\n'
).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Sink
impl !RefUnwindSafe for Sink
impl Send for Sink
impl Sync for Sink
impl Unpin for Sink
impl !UnwindSafe for Sink
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more