#[non_exhaustive]pub struct TransportOptions {
pub dsn: Dsn,
pub user_agent: Cow<'static, str>,
pub http_proxy: Option<Cow<'static, str>>,
pub https_proxy: Option<Cow<'static, str>>,
pub accept_invalid_certs: bool,
pub client_report_recorder: Recorder,
pub transport_channel_capacity: Option<NonZeroUsize>,
}Expand description
Options for a transport.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.dsn: DsnThe transport’s Sentry DSN.
user_agent: Cow<'static, str>The user agent sent with transport requests.
http_proxy: Option<Cow<'static, str>>An optional HTTP proxy to use.
https_proxy: Option<Cow<'static, str>>An optional HTTPS proxy to use.
accept_invalid_certs: boolWhether TLS certificate validation should be disabled.
client_report_recorder: RecorderA handle for recording lost Sentry data.
transport_channel_capacity: Option<NonZeroUsize>The maximum number of commands the transport channel can queue.
The channel primarily carries envelopes; control commands, such as flushing and shutdown, also count against this capacity.
If None, the transport uses its own default. The current default is 30 for all
built-in transports, but this is subject to change.
Implementations§
Source§impl TransportOptions
impl TransportOptions
Sourcepub fn try_from_client_options(options: &ClientOptions) -> Option<Self>
pub fn try_from_client_options(options: &ClientOptions) -> Option<Self>
Try to convert a &ClientOptions to a TransportOptions by extracting
the relevant fields from the ClientOptions.
This method is provided so that code which expects TransportOptions can be
backwards-compatible with older code, which provides ClientOptions.
Returns None if options.dsn is None, Some(_) otherwise.