Endpoint
pub struct Endpoint { /* private fields */ }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!")?;Methods
from_name
View sourcefn from_name(name: &str) -> SelfGet an Endpoint by name.
Panics
If the endpoint name is not valid, this function will panic.
Parameters
- name: &str
Returns
Self
from_u32
View sourceunsafe fn from_u32(handle: u32, name: String) -> SelfMake a handle from its underlying representation.
This should only be used when calling the raw ABI directly, and care should be taken not to reuse or alias handle values.
Parameters
- handle: u32
- name: String
Returns
Self
try_from_name
View sourceTry 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
stdoutorstderr, which are reserved for debugging.
Parameters
- name: &str
Returns