Skip to main content

HotUpdateProxyConfig

Struct HotUpdateProxyConfig 

Source
pub struct HotUpdateProxyConfig { /* private fields */ }
Expand description

Proxy-aware on-device hot-update connection configuration bridging direct, reverse-proxy, and HTTP forward-proxy transports.

Implementations§

Source§

impl HotUpdateProxyConfig

Construction, proxy helpers, and client conversion on HotUpdateProxyConfig.

Source

pub fn new( server_url: String, proxy_url: Option<String>, proxy_auth: Option<String>, channel: String, auto_apply: bool, poll_fallback_secs: u64, ) -> Self

Constructs a HotUpdateProxyConfig with explicit server, proxy, channel, and polling policy.

§Arguments
  • String - Target update server base URL (direct or reverse-proxy prefix).
  • Option<String> - Optional explicit HTTP forward proxy URL.
  • Option<String> - Optional Proxy-Authorization credential string.
  • String - Target release channel name.
  • bool - Whether verified updates apply automatically.
  • u64 - Fallback manifest polling cadence in seconds.
§Returns
  • Self - Configured hot-update proxy settings.
Source

pub fn proxy_url_str(&self) -> Option<&str>

Returns the optional configured HTTP forward proxy URL.

§Arguments
  • &Self - Proxy configuration reference.
§Returns
  • Option<&str> - Forward proxy URL when configured.
Source

pub fn proxy_auth_str(&self) -> Option<&str>

Returns the optional configured Proxy-Authorization credential string.

§Arguments
  • &Self - Proxy configuration reference.
§Returns
  • Option<&str> - Proxy credential string when configured.
Source

pub fn effective_web_base_url(&self) -> String

Resolves the effective base URL for Web fetch / EventSource clients (preferring a reverse-proxy base when provided).

§Arguments
  • &Self - Proxy configuration reference.
§Returns
  • String - Normalized browser-reachable base URL without trailing slash.
Source

pub fn to_client_config( &self, project: String, verify_key: Vec<u8>, ) -> UpdateClientConfig

Converts this HotUpdateProxyConfig into an UpdateClientConfig ready for start_updates.

§Arguments
  • &Self - Proxy configuration reference.
  • String - Logical project identifier.
  • Vec<u8> - Trusted HMAC-SHA256 manifest verification key bytes.
§Returns
  • UpdateClientConfig - Ready background worker client configuration.
Source§

impl HotUpdateProxyConfig

Source

pub fn get_server_url(&self) -> &String

Source

pub fn get_mut_server_url(&mut self) -> &mut String

Source

pub fn set_server_url(&mut self, val: String) -> &mut Self

Source

pub fn get_mut_proxy_url(&mut self) -> &mut Option<String>

Source

pub fn set_proxy_url(&mut self, val: Option<String>) -> &mut Self

Source

pub fn get_mut_proxy_auth(&mut self) -> &mut Option<String>

Source

pub fn set_proxy_auth(&mut self, val: Option<String>) -> &mut Self

Source

pub fn get_channel(&self) -> &String

Source

pub fn get_mut_channel(&mut self) -> &mut String

Source

pub fn set_channel(&mut self, val: String) -> &mut Self

Source

pub fn get_auto_apply(&self) -> bool

Source

pub fn get_mut_auto_apply(&mut self) -> &mut bool

Source

pub fn set_auto_apply(&mut self, val: bool) -> &mut Self

Source

pub fn get_poll_fallback_secs(&self) -> u64

Source

pub fn get_mut_poll_fallback_secs(&mut self) -> &mut u64

Source

pub fn set_poll_fallback_secs(&mut self, val: u64) -> &mut Self

Trait Implementations§

Source§

impl Clone for HotUpdateProxyConfig

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for HotUpdateProxyConfig

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for HotUpdateProxyConfig

Production defaults for HotUpdateProxyConfig.

Source§

fn default() -> Self

Returns default local hot-update server and direct connection settings.

§Returns
  • Self - Default hot-update proxy configuration.
Source§

impl<'de> Deserialize<'de> for HotUpdateProxyConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for HotUpdateProxyConfig

Source§

impl PartialEq for HotUpdateProxyConfig

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for HotUpdateProxyConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for HotUpdateProxyConfig

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
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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.