pub struct Endpoint { /* private fields */ }
Expand description
A Fastly logging endpoint.
Most applications should use the high-level interface provided by
log-fastly
rather than writing to this interface directly.
To write to this endpoint, use the std::io::Write
interface. For example:
use std::io::Write;
let mut endpoint = Endpoint::from_name("my_endpoint");
writeln!(endpoint, "Hello from the edge!").unwrap();
Implementations§
source§impl Endpoint
impl Endpoint
sourcepub fn try_from_name(name: &str) -> Result<Self, LogError>
pub fn try_from_name(name: &str) -> Result<Self, LogError>
Try to get an Endpoint
by name.
Currently, the conditions on an endpoint name are:
-
It must not be empty
-
It must not contain newlines (
\n
) or colons (:
) -
It must not be
stdout
orstderr
, which are reserved for debugging.
Trait Implementations§
source§impl PartialEq<Endpoint> for Endpoint
impl PartialEq<Endpoint> for Endpoint
source§impl Write for Endpoint
impl Write for Endpoint
source§fn write(&mut self, buf: &[u8]) -> Result<usize>
fn write(&mut self, buf: &[u8]) -> Result<usize>
Write a buffer into this writer, returning how many bytes were written. Read more
source§fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Flush this output stream, ensuring that all intermediately buffered
contents reach their destination. Read more
source§fn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
🔬This is a nightly-only experimental API. (
can_vector
)1.0.0 · source§fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
Attempts to write an entire buffer into this writer. Read more
source§fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
🔬This is a nightly-only experimental API. (
write_all_vectored
)Attempts to write multiple buffers into this writer. Read more