Struct segment::HttpClient
source · pub struct HttpClient { /* private fields */ }
Expand description
A client which synchronously sends single messages to the Segment tracking API.
HttpClient
implements Client
; see the
documentation for Client
for more on how to send events to Segment.
Implementations§
source§impl HttpClient
impl HttpClient
sourcepub fn new(client: Client, host: String) -> HttpClient
pub fn new(client: Client, host: String) -> HttpClient
Construct a new HttpClient
from a reqwest::Client
and a Segment API
scheme and host.
If you don’t care to re-use an existing reqwest::Client
, you can use
the Default::default
value, which will send events to
https://api.segment.io
.
Trait Implementations§
source§impl Client for HttpClient
impl Client for HttpClient
source§impl Clone for HttpClient
impl Clone for HttpClient
source§fn clone(&self) -> HttpClient
fn clone(&self) -> HttpClient
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for HttpClient
impl !RefUnwindSafe for HttpClient
impl Send for HttpClient
impl Sync for HttpClient
impl Unpin for HttpClient
impl !UnwindSafe for HttpClient
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)