#[non_exhaustive]pub enum ProfileChannel {
ChromeLatest,
FirefoxLatest,
SafariLatest,
EdgeLatest,
Chrome131,
Firefox133,
Safari18,
Edge131,
}Expand description
Named update channel for automatic profile resolution.
ChromeLatest, FirefoxLatest, etc. are symbolic aliases that always
resolve to the most recent pinned profile for that browser. Pinned
variants reference a specific browser version and never change.
§Example
use stygian_browser::tls::{ProfileChannel, TlsProfilePack};
let pack = ProfileChannel::ChromeLatest.resolve(None).unwrap();
assert_eq!(pack.metadata.family, stygian_browser::tls::BrowserFamily::Chrome);Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ChromeLatest
Always resolves to the latest built-in Chrome profile.
FirefoxLatest
Always resolves to the latest built-in Firefox profile.
SafariLatest
Always resolves to the latest built-in Safari profile.
EdgeLatest
Always resolves to the latest built-in Edge profile.
Chrome131
Pinned: Chrome 131.
Firefox133
Pinned: Firefox 133.
Safari18
Pinned: Safari 18.
Edge131
Pinned: Edge 131.
Implementations§
Source§impl ProfileChannel
impl ProfileChannel
Sourcepub fn resolve(
self,
_platform: Option<PlatformClass>,
) -> Result<&'static TlsProfilePack, ProfileChannelError>
pub fn resolve( self, _platform: Option<PlatformClass>, ) -> Result<&'static TlsProfilePack, ProfileChannelError>
Resolve this channel to a static TlsProfilePack.
platform is an optional hint; it is recorded in diagnostics but does
not change which profile is returned for the current built-in set.
§Errors
Returns ProfileChannelError::UnknownChannel if the channel string
cannot be parsed. (This variant is only reachable via
std::str::FromStr::from_str.)
§Example
use stygian_browser::tls::{ProfileChannel, PlatformClass};
let pack = ProfileChannel::Firefox133.resolve(Some(PlatformClass::Linux)).unwrap();
assert_eq!(pack.profile.name, "Firefox 133");Trait Implementations§
Source§impl Clone for ProfileChannel
impl Clone for ProfileChannel
Source§fn clone(&self) -> ProfileChannel
fn clone(&self) -> ProfileChannel
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProfileChannel
impl Debug for ProfileChannel
Source§impl<'de> Deserialize<'de> for ProfileChannel
impl<'de> Deserialize<'de> for ProfileChannel
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>,
Source§impl FromStr for ProfileChannel
impl FromStr for ProfileChannel
Source§fn from_str(s: &str) -> Result<Self, Self::Err>
fn from_str(s: &str) -> Result<Self, Self::Err>
Parse a channel name string (case-insensitive).
Recognised channel names:
| Input | Channel |
|---|---|
chrome-latest | ProfileChannel::ChromeLatest |
firefox-latest | ProfileChannel::FirefoxLatest |
safari-latest | ProfileChannel::SafariLatest |
edge-latest | ProfileChannel::EdgeLatest |
chrome-131 | ProfileChannel::Chrome131 |
firefox-133 | ProfileChannel::Firefox133 |
safari-18 | ProfileChannel::Safari18 |
edge-131 | ProfileChannel::Edge131 |
§Errors
Returns ProfileChannelError::UnknownChannel for unrecognised names.
§Example
use stygian_browser::tls::ProfileChannel;
let ch: ProfileChannel = "chrome-latest".parse().unwrap();
assert_eq!(ch, ProfileChannel::ChromeLatest);