Struct ServerConfig

Source
pub struct ServerConfig {
Show 41 fields pub host: String, pub port: u16, pub redis_url: String, pub redis_reader_url: Option<String>, pub config_file_path: String, pub api_key: SecretString, pub rate_limit_requests_per_second: u64, pub rate_limit_burst_size: u32, pub metrics_port: u16, pub enable_swagger: bool, pub redis_connection_timeout_ms: u64, pub redis_key_prefix: String, pub redis_pool_max_size: usize, pub redis_reader_pool_max_size: usize, pub redis_pool_timeout_ms: u64, pub rpc_timeout_ms: u64, pub provider_max_retries: u8, pub provider_retry_base_delay_ms: u64, pub provider_retry_max_delay_ms: u64, pub provider_max_failovers: u8, pub provider_failure_threshold: u32, pub provider_pause_duration_secs: u64, pub provider_failure_expiration_secs: u64, pub repository_storage_type: RepositoryStorageType, pub reset_storage_on_start: bool, pub storage_encryption_key: Option<SecretString>, pub transaction_expiration_hours: f64, pub rpc_allowed_hosts: Vec<String>, pub rpc_block_private_ips: bool, pub relayer_concurrency_limit: usize, pub max_connections: usize, pub connection_backlog: u32, pub request_timeout_seconds: u64, pub stellar_mainnet_fee_forwarder_address: Option<String>, pub stellar_testnet_fee_forwarder_address: Option<String>, pub stellar_mainnet_soroswap_router_address: Option<String>, pub stellar_testnet_soroswap_router_address: Option<String>, pub stellar_mainnet_soroswap_factory_address: Option<String>, pub stellar_testnet_soroswap_factory_address: Option<String>, pub stellar_mainnet_soroswap_native_wrapper_address: Option<String>, pub stellar_testnet_soroswap_native_wrapper_address: Option<String>,
}

Fields§

§host: String

The host address the server will bind to.

§port: u16

The port number the server will listen on.

§redis_url: String

The URL for the Redis primary instance (used for write operations).

§redis_reader_url: Option<String>

Optional URL for Redis reader endpoint (used for read operations). When set, read operations use this endpoint while writes use redis_url. Useful for AWS ElastiCache with read replicas.

§config_file_path: String

The file path to the server’s configuration file.

§api_key: SecretString

The API key used for authentication.

§rate_limit_requests_per_second: u64

The number of requests allowed per second.

§rate_limit_burst_size: u32

The maximum burst size for rate limiting.

§metrics_port: u16

The port number for exposing metrics.

§enable_swagger: bool

Enable Swagger UI.

§redis_connection_timeout_ms: u64

The number of seconds to wait for a Redis connection.

§redis_key_prefix: String

The prefix for the Redis key.

§redis_pool_max_size: usize

Maximum number of connections in the Redis pool.

§redis_reader_pool_max_size: usize

Maximum pool size for reader connections. Defaults to 1000. Useful for read-heavy workloads where more reader connections are beneficial.

§redis_pool_timeout_ms: u64

Timeout in milliseconds waiting to get a connection from the pool.

§rpc_timeout_ms: u64

The number of milliseconds to wait for an RPC response.

§provider_max_retries: u8

Maximum number of retry attempts for provider operations.

§provider_retry_base_delay_ms: u64

Base delay between retry attempts (milliseconds).

§provider_retry_max_delay_ms: u64

Maximum delay between retry attempts (milliseconds).

§provider_max_failovers: u8

Maximum number of failovers (switching to different providers).

§provider_failure_threshold: u32

Number of consecutive failures before pausing a provider.

§provider_pause_duration_secs: u64

Duration in seconds to pause a provider after reaching failure threshold.

§provider_failure_expiration_secs: u64

Duration in seconds after which failures are considered stale and reset.

§repository_storage_type: RepositoryStorageType

The type of repository storage to use.

§reset_storage_on_start: bool

Flag to force config file processing.

§storage_encryption_key: Option<SecretString>

The encryption key for the storage.

§transaction_expiration_hours: f64

Transaction expiration time in hours for transactions in final states. Supports fractional values (e.g., 0.1 = 6 minutes).

§rpc_allowed_hosts: Vec<String>

Comma-separated list of allowed RPC hosts (domains or IPs). If non-empty, only these hosts are permitted.

§rpc_block_private_ips: bool

If true, block private IP addresses (RFC 1918, loopback, link-local). Cloud metadata endpoints are always blocked.

§relayer_concurrency_limit: usize

Maximum number of concurrent requests allowed for /api/v1/relayers/* endpoints.

§max_connections: usize

Maximum number of concurrent TCP connections server-wide.

§connection_backlog: u32

TCP listen connection backlog size (pending connections queue). Higher values allow more connections to be queued during traffic bursts.

§request_timeout_seconds: u64

Request handler timeout in seconds for API endpoints.

§stellar_mainnet_fee_forwarder_address: Option<String>

Stellar mainnet FeeForwarder contract address for gas abstraction.

§stellar_testnet_fee_forwarder_address: Option<String>

Stellar testnet FeeForwarder contract address for gas abstraction.

§stellar_mainnet_soroswap_router_address: Option<String>

Stellar mainnet Soroswap router contract address.

§stellar_testnet_soroswap_router_address: Option<String>

Stellar testnet Soroswap router contract address.

§stellar_mainnet_soroswap_factory_address: Option<String>

Stellar mainnet Soroswap factory contract address.

§stellar_testnet_soroswap_factory_address: Option<String>

Stellar testnet Soroswap factory contract address.

§stellar_mainnet_soroswap_native_wrapper_address: Option<String>

Stellar mainnet native XLM wrapper token address for Soroswap.

§stellar_testnet_soroswap_native_wrapper_address: Option<String>

Stellar testnet native XLM wrapper token address for Soroswap.

Implementations§

Source§

impl ServerConfig

Source

pub fn from_env() -> Self

Creates a new ServerConfig instance from environment variables.

§Panics

This function will panic if the REDIS_URL or API_KEY environment variables are not set, as they are required for the server to function.

§Defaults
  • HOST defaults to "0.0.0.0".
  • APP_PORT defaults to 8080.
  • CONFIG_DIR defaults to "config/config.json".
  • RATE_LIMIT_REQUESTS_PER_SECOND defaults to 100.
  • RATE_LIMIT_BURST_SIZE defaults to 300.
  • METRICS_PORT defaults to 8081.
  • PROVIDER_MAX_RETRIES defaults to 3.
  • PROVIDER_RETRY_BASE_DELAY_MS defaults to 100.
  • PROVIDER_RETRY_MAX_DELAY_MS defaults to 2000.
  • PROVIDER_MAX_FAILOVERS defaults to 3.
  • PROVIDER_FAILURE_THRESHOLD defaults to 3.
  • PROVIDER_PAUSE_DURATION_SECS defaults to 60 (1 minute).
  • PROVIDER_FAILURE_EXPIRATION_SECS defaults to 60 (1 minute).
  • REPOSITORY_STORAGE_TYPE defaults to "in_memory".
  • TRANSACTION_EXPIRATION_HOURS defaults to 4.
  • REQUEST_TIMEOUT_SECONDS defaults to 30 (security measure for DoS protection).
  • CONNECTION_BACKLOG defaults to 511 (production-ready value for traffic bursts).
Source

pub fn get_host() -> String

Gets the host from environment variable or default

Source

pub fn get_port() -> u16

Gets the port from environment variable or default

Source

pub fn get_redis_url() -> String

Gets the Redis URL from environment variable (panics if not set)

Source

pub fn get_redis_url_optional() -> Option<String>

Gets the Redis URL from environment variable or returns None if not set

Source

pub fn get_redis_reader_url_optional() -> Option<String>

Gets the Redis reader URL from environment variable or returns None if not set. When set, read operations will use this endpoint while writes use REDIS_URL. Useful for AWS ElastiCache with read replicas.

Source

pub fn get_config_file_path() -> String

Gets the config file path from environment variables or default

Source

pub fn get_queue_backend() -> String

Gets the queue backend from environment variable or default.

Supported values: “redis”, “sqs” Defaults to “redis” when not set.

Source

pub fn get_sqs_queue_type() -> String

Gets the SQS queue type from environment variable or default.

Supported values: “auto” (default), “standard”, “fifo”

  • auto: auto-detect by probing queues at startup
  • standard / fifo: skip probing, use the specified type directly
Source

pub fn get_aws_region() -> Result<String, String>

Gets the AWS region from environment variable.

Required when using SQS queue backend.

§Errors

Returns error if AWS_REGION is not set.

Source

pub fn get_aws_account_id() -> Result<String, String>

Gets the AWS account ID from environment variable.

Required when using SQS queue backend and SQS_QUEUE_URL_PREFIX is not provided.

§Errors

Returns error if AWS_ACCOUNT_ID is not set.

Source

pub fn get_api_key() -> SecretString

Gets the API key from environment variable (panics if not set or too short)

Source

pub fn get_api_key_optional() -> Option<SecretString>

Gets the API key from environment variable or returns None if not set or invalid

Source

pub fn get_rate_limit_requests_per_second() -> u64

Gets the rate limit requests per second from environment variable or default

Source

pub fn get_rate_limit_burst_size() -> u32

Gets the rate limit burst size from environment variable or default

Source

pub fn get_metrics_port() -> u16

Gets the metrics port from environment variable or default

Source

pub fn get_enable_swagger() -> bool

Gets the enable swagger setting from environment variable or default

Source

pub fn get_redis_connection_timeout_ms() -> u64

Gets the Redis connection timeout from environment variable or default

Source

pub fn get_redis_key_prefix() -> String

Gets the Redis key prefix from environment variable or default

Source

pub fn get_redis_pool_max_size() -> usize

Gets the Redis pool max size from environment variable or default Returns default (500) if value is 0 or invalid

Source

pub fn get_redis_reader_pool_max_size() -> usize

Gets the Redis reader pool max size from environment variable. Returns 1000 if not set or invalid.

Source

pub fn get_redis_pool_timeout_ms() -> u64

Gets the Redis pool timeout from environment variable or default Returns default (10000) if value is 0 or invalid

Source

pub fn get_rpc_timeout_ms() -> u64

Gets the RPC timeout from environment variable or default

Source

pub fn get_provider_max_retries() -> u8

Gets the provider max retries from environment variable or default

Source

pub fn get_provider_retry_base_delay_ms() -> u64

Gets the provider retry base delay from environment variable or default

Source

pub fn get_provider_retry_max_delay_ms() -> u64

Gets the provider retry max delay from environment variable or default

Source

pub fn get_provider_max_failovers() -> u8

Gets the provider max failovers from environment variable or default

Source

pub fn get_provider_failure_threshold() -> u32

Gets the provider failure threshold from environment variable or default

Source

pub fn get_provider_pause_duration_secs() -> u64

Gets the provider pause duration in seconds from environment variable or default

Defaults to 60 seconds (1 minute) for faster recovery while still providing a reasonable cooldown period for failed providers.

Source

pub fn get_provider_failure_expiration_secs() -> u64

Gets the provider failure expiration duration in seconds from environment variable or default

Defaults to 60 seconds (1 minute). Failures older than this are considered stale and reset, allowing providers to naturally recover over time.

Source

pub fn get_repository_storage_type() -> RepositoryStorageType

Gets the repository storage type from environment variable or default

Source

pub fn get_reset_storage_on_start() -> bool

Gets the reset storage on start setting from environment variable or default

Source

pub fn get_storage_encryption_key() -> Option<SecretString>

Gets the storage encryption key from environment variable or None

Source

pub fn get_transaction_expiration_hours() -> f64

Gets the transaction expiration hours from environment variable or default Supports fractional values (e.g., 0.1 = 6 minutes).

Source

pub fn get_rpc_allowed_hosts() -> Vec<String>

Gets the allowed RPC hosts from environment variable or default (empty list)

Source

pub fn get_rpc_block_private_ips() -> bool

Gets the block private IPs setting from environment variable or default (false)

Source

pub fn get_relayer_concurrency_limit() -> usize

Gets the relayer concurrency limit from environment variable or default (100)

Source

pub fn get_max_connections() -> usize

Gets the max connections from environment variable or default (256)

Source

pub fn get_connection_backlog() -> u32

Gets the connection backlog from environment variable or default (511)

TCP listen backlog controls the size of the queue for pending connections. Higher values allow more connections to be queued during traffic bursts, preventing connection drops. Default of 511.

Source

pub fn get_request_timeout_seconds() -> u64

Gets the request timeout in seconds from environment variable or default (30)

This is a security measure to prevent resource exhaustion attacks (DoS). It limits how long a request handler can run, preventing slowloris-style attacks and ensuring resources are freed promptly.

Source

pub fn get_distributed_mode() -> bool

Gets whether distributed mode is enabled from the DISTRIBUTED_MODE environment variable.

When true, distributed locks are used to coordinate across multiple instances (e.g., preventing duplicate cron execution in multi-instance deployments). When false (default), locks are skipped — appropriate for single-instance deployments.

Defaults to false.

Source

pub fn get_stellar_mainnet_fee_forwarder_address() -> Option<String>

Source

pub fn get_stellar_testnet_fee_forwarder_address() -> Option<String>

Source

pub fn get_stellar_mainnet_soroswap_router_address() -> Option<String>

Source

pub fn get_stellar_testnet_soroswap_router_address() -> Option<String>

Source

pub fn get_stellar_mainnet_soroswap_factory_address() -> Option<String>

Source

pub fn get_stellar_testnet_soroswap_factory_address() -> Option<String>

Source

pub fn get_stellar_mainnet_soroswap_native_wrapper_address() -> Option<String>

Source

pub fn get_stellar_testnet_soroswap_native_wrapper_address() -> Option<String>

Source

pub fn resolve_stellar_fee_forwarder_address(is_testnet: bool) -> Option<String>

Resolves the FeeForwarder contract address for the given network.

Source

pub fn resolve_stellar_soroswap_router_address( is_testnet: bool, ) -> Option<String>

Resolves the Soroswap router contract address for the given network.

Source

pub fn resolve_stellar_soroswap_factory_address( is_testnet: bool, ) -> Option<String>

Resolves the Soroswap factory contract address for the given network.

Source

pub fn resolve_stellar_soroswap_native_wrapper_address( is_testnet: bool, ) -> Option<String>

Resolves the Soroswap native wrapper token address for the given network.

Source

pub fn get_worker_concurrency(worker_name: &str, default: usize) -> usize

Get worker concurrency from environment variable or use default

Environment variable format: BACKGROUND_WORKER_{WORKER_NAME}_CONCURRENCY Example: BACKGROUND_WORKER_TRANSACTION_REQUEST_CONCURRENCY=20

Trait Implementations§

Source§

impl Clone for ServerConfig

Source§

fn clone(&self) -> ServerConfig

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ServerConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
§

impl<D> OwoColorize for D

§

fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>
where C: Color,

Set the foreground color generically Read more
§

fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>
where C: Color,

Set the background color generically. Read more
§

fn black(&self) -> FgColorDisplay<'_, Black, Self>

Change the foreground color to black
§

fn on_black(&self) -> BgColorDisplay<'_, Black, Self>

Change the background color to black
§

fn red(&self) -> FgColorDisplay<'_, Red, Self>

Change the foreground color to red
§

fn on_red(&self) -> BgColorDisplay<'_, Red, Self>

Change the background color to red
§

fn green(&self) -> FgColorDisplay<'_, Green, Self>

Change the foreground color to green
§

fn on_green(&self) -> BgColorDisplay<'_, Green, Self>

Change the background color to green
§

fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>

Change the foreground color to yellow
§

fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>

Change the background color to yellow
§

fn blue(&self) -> FgColorDisplay<'_, Blue, Self>

Change the foreground color to blue
§

fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>

Change the background color to blue
§

fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to magenta
§

fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to magenta
§

fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to purple
§

fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to purple
§

fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>

Change the foreground color to cyan
§

fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>

Change the background color to cyan
§

fn white(&self) -> FgColorDisplay<'_, White, Self>

Change the foreground color to white
§

fn on_white(&self) -> BgColorDisplay<'_, White, Self>

Change the background color to white
§

fn default_color(&self) -> FgColorDisplay<'_, Default, Self>

Change the foreground color to the terminal default
§

fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>

Change the background color to the terminal default
§

fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>

Change the foreground color to bright black
§

fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>

Change the background color to bright black
§

fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>

Change the foreground color to bright red
§

fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>

Change the background color to bright red
§

fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>

Change the foreground color to bright green
§

fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>

Change the background color to bright green
§

fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>

Change the foreground color to bright yellow
§

fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>

Change the background color to bright yellow
§

fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>

Change the foreground color to bright blue
§

fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>

Change the background color to bright blue
§

fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright magenta
§

fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright magenta
§

fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright purple
§

fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright purple
§

fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>

Change the foreground color to bright cyan
§

fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>

Change the background color to bright cyan
§

fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>

Change the foreground color to bright white
§

fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>

Change the background color to bright white
§

fn bold(&self) -> BoldDisplay<'_, Self>

Make the text bold
§

fn dimmed(&self) -> DimDisplay<'_, Self>

Make the text dim
§

fn italic(&self) -> ItalicDisplay<'_, Self>

Make the text italicized
§

fn underline(&self) -> UnderlineDisplay<'_, Self>

Make the text underlined
Make the text blink
Make the text blink (but fast!)
§

fn reversed(&self) -> ReversedDisplay<'_, Self>

Swap the foreground and background colors
§

fn hidden(&self) -> HiddenDisplay<'_, Self>

Hide the text
§

fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>

Cross out the text
§

fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the foreground color at runtime. Only use if you do not know which color will be used at compile-time. If the color is constant, use either [OwoColorize::fg] or a color-specific method, such as [OwoColorize::green], Read more
§

fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the background color at runtime. Only use if you do not know what color to use at compile-time. If the color is constant, use either [OwoColorize::bg] or a color-specific method, such as [OwoColorize::on_yellow], Read more
§

fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the foreground color to a specific RGB value.
§

fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the background color to a specific RGB value.
§

fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>

Sets the foreground color to an RGB value.
§

fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>

Sets the background color to an RGB value.
§

fn style(&self, style: Style) -> Styled<&Self>

Apply a runtime-determined style
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T> TryClone for T
where T: Clone,

§

fn try_clone(&self) -> Result<T, Error>

Clones self, possibly returning an error.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> MaybeSend for T
where T: Send,