pub struct Endpoint {
pub url: Uri,
pub api_key: Option<Cow<'static, str>>,
pub timeout_ms: u64,
pub test_token: Option<Cow<'static, str>>,
}Fields§
§url: Uri§api_key: Option<Cow<'static, str>>§timeout_ms: u64§test_token: Option<Cow<'static, str>>Sets X-Datadog-Test-Session-Token header on any request
Implementations§
Source§impl Endpoint
impl Endpoint
Sourcepub const DEFAULT_TIMEOUT: u64 = 3_000u64
pub const DEFAULT_TIMEOUT: u64 = 3_000u64
Default value for the timeout field in milliseconds.
Sourcepub fn to_request_builder(&self, user_agent: &str) -> Result<HttpRequestBuilder>
pub fn to_request_builder(&self, user_agent: &str) -> Result<HttpRequestBuilder>
Return a request builder with the following headers:
- User agent
- Api key
- Container Id/Entity Id
pub fn from_slice(url: &str) -> Endpoint
pub fn from_url(url: Uri) -> Endpoint
pub fn is_file_endpoint(&self) -> bool
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Endpoint
impl<'de> Deserialize<'de> for Endpoint
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Endpoint
impl StructuralPartialEq for Endpoint
Auto Trait Implementations§
impl !Freeze for Endpoint
impl RefUnwindSafe for Endpoint
impl Send for Endpoint
impl Sync for Endpoint
impl Unpin for Endpoint
impl UnwindSafe for Endpoint
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