Struct TransportOptions
#[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<NonZero<usize>>,
}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<NonZero<usize>>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§
§impl TransportOptions
impl TransportOptions
pub fn try_from_client_options(
options: &ClientOptions,
) -> Option<TransportOptions>
pub fn try_from_client_options( options: &ClientOptions, ) -> Option<TransportOptions>
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.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TransportOptions
impl RefUnwindSafe for TransportOptions
impl Send for TransportOptions
impl Sync for TransportOptions
impl Unpin for TransportOptions
impl UnsafeUnpin for TransportOptions
impl UnwindSafe for TransportOptions
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more