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
sourceimpl 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
sourceimpl Write for Endpoint
impl Write for Endpoint
sourcefn 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
sourcefn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
sourcefn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
can_vector
)Determines if this Write
r has an efficient write_vectored
implementation. Read more
1.0.0 · sourcefn 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
sourcefn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>
write_all_vectored
)Attempts to write multiple buffers into this writer. Read more
impl Eq for Endpoint
impl StructuralEq for Endpoint
impl StructuralPartialEq for Endpoint
Auto Trait Implementations
impl RefUnwindSafe for Endpoint
impl Send for Endpoint
impl Sync for Endpoint
impl Unpin for Endpoint
impl UnwindSafe for Endpoint
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more