Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/amodm/webbrowser-rs
/ functions
Functions
120 in github.com/amodm/webbrowser-rs
⨍
Functions
120
◇
Types & classes
12
↓ 9 callers
Function
check_local_file
(browser: Browser, html_dir: Option<PathBuf>, url_op: F)
tests/common.rs:103
↓ 8 callers
Function
open
Opens the URL on the default browser of this platform Returns Ok(..) so long as the browser invocation was successful. An Err(..) is returned in the
src/lib.rs:278
↓ 6 callers
Function
check_browser
(browser: Browser, platform: &str)
tests/common.rs:130
↓ 5 callers
Function
check_request_received_using
(uri: String, host: &str, op: F)
tests/common.rs:43
↓ 4 callers
Function
browser_env_cmd_arr
Given a part in BROWSER env variable, return a Vec of parsed strings, such that: - `%s` is replaced with the provided `url`. - `%c` is replaced with `
src/unix.rs:128
↓ 4 callers
Function
run_command
Run the specified command in foreground/background
src/common.rs:48
↓ 3 callers
Function
for_matching_path
(name: &str, op: F)
src/unix.rs:446
↓ 3 callers
Method
get_http_url
(&self)
src/lib.rs:370
↓ 3 callers
Function
open_browser
Opens the specified URL on the specific browser (if available) requested. Return semantics are the same as for [open](fn.open.html). # Examples ```no
src/lib.rs:293
↓ 2 callers
Method
exists
Returns true if this specific browser is detected in the system
src/lib.rs:122
↓ 2 callers
Function
for_each_token
Parses `line` to find tokens (including quoted strings), and invokes `op` on each token
src/common.rs:7
↓ 2 callers
Method
is_http
(&self)
src/lib.rs:357
↓ 2 callers
Function
open_browser_with_options
Opens the specified URL on the specific browser (if available) requested, while overriding the default options. Return semantics are the same as for
src/lib.rs:311
↓ 2 callers
Function
open_using_xdg_config
Opens `url` using xdg configuration found in `config_path` See https://specifications.freedesktop.org/desktop-entry-spec/latest for details
src/unix.rs:349
↓ 2 callers
Function
parse_wsl_cmdline
Given the configured command line `cmdline` in registry, and the given `url`, return the appropriate `Command` to invoke
src/unix.rs:713
↓ 2 callers
Function
unc_aware_url_arg
Return the string to hand to the browser for `target`. For a Windows UNC path like `\\server\share\file.html`, the `url` crate produces the authority
src/windows.rs:151
↓ 1 callers
Function
bundle_id_for_browser
Maps a [`Browser`] to its macOS bundle identifier. Returns `None` for browsers that aren't supported on macOS.
src/macos.rs:118
↓ 1 callers
Function
check_request_received
(browser: Browser, uri: String)
tests/common.rs:95
↓ 1 callers
Function
ensure_cmd_quotes
It seems that sometimes browser exe paths which have spaces are not quoted, so we keep going over each token, until we encounter what looks like a val
src/windows.rs:96
↓ 1 callers
Function
get_browser_cmd
Given the configured command line `cmdline` in registry, and the given `url`, return the appropriate `Command` to invoke
src/windows.rs:120
↓ 1 callers
Function
get_ipv4_address
()
tests/test_ios.rs:124
↓ 1 callers
Function
get_temp_path
(name: &str, suffix: &str)
src/unix.rs:491
↓ 1 callers
Function
get_wsl_distro_name
Gets the WSL distro name
src/unix.rs:787
↓ 1 callers
Function
get_wsl_win_config
Returns a [WindowsConfig] by iterating over PATH entries. This seems to be the fastest way to determine this.
src/unix.rs:614
↓ 1 callers
Function
get_wsl_windows_browser_cmd
Try to get default browser command from cmd.exe
src/unix.rs:687
↓ 1 callers
Function
get_wsl_windows_browser_ps
Try to get default browser command from powershell.exe
src/unix.rs:655
↓ 1 callers
Function
get_xdg_dirs
Get the list of directories in which the desktop file needs to be searched
src/unix.rs:411
↓ 1 callers
Function
guess_desktop_env
Detect the desktop environment
src/unix.rs:182
↓ 1 callers
Function
is_flatpak
()
src/unix.rs:175
↓ 1 callers
Function
is_text_browser
Returns true if specified command refers to a known list of text browsers
src/unix.rs:437
↓ 1 callers
Function
is_wsl
Check if we are inside WSL on Windows, and interoperability with Windows tools is enabled.
src/unix.rs:155
↓ 1 callers
Function
map_launch_error
Maps an `NSError` returned while launching the browser to our [`Error`] type, preserving the `NotFound`/`PermissionDenied` distinctions where possible
src/macos.rs:83
↓ 1 callers
Function
open_browser_default
Open the default browser
src/android.rs:96
↓ 1 callers
Function
open_browser_default
Open the default browser. [BrowserOptions::dry_run] is handled inside [run_command], as all execution paths eventually rely on it to execute.
src/unix.rs:46
↓ 1 callers
Function
open_browser_internal
Deal with opening of browsers on iOS/tvOS/visionOS. watchOS doesn't have a browser, so this won't work there.
src/ios.rs:40
↓ 1 callers
Function
open_browser_internal
( browser: Browser, target: &TargetType, options: &BrowserOptions, )
src/macos.rs:9
↓ 1 callers
Function
open_url
(app: &NSObject, url: &NSURL, options: &NSDictionary)
src/ios.rs:32
↓ 1 callers
Function
resolve_default_browser
Determine the URL of the user's default browser, falling back to Safari if detection fails for any reason.
src/macos.rs:98
↓ 1 callers
Function
run_cmd
(app_dir: &PathBuf, args: &[&str])
tests/test_ios.rs:143
↓ 1 callers
Function
sharedApplication
(mtm: MainThreadMarker)
src/ios.rs:10
↓ 1 callers
Method
testOpenBrowser
(url: String)
tests/test-ios-app/test-ios-app/TestGlueInterface.swift:2
↓ 1 callers
Function
test_open_webbrowser
(url_c_chars: *const c_char)
tests/test-ios-app/testglue/src/lib.rs:9
↓ 1 callers
Function
try_flatpak
Open browser in Flatpak environments
src/unix.rs:260
↓ 1 callers
Function
try_for_termux
Attemps to open a browser assuming a termux environment See [issue #53](https://github.com/amodm/webbrowser-rs/issues/53)
src/android.rs:194
↓ 1 callers
Function
try_haiku
Handle Haiku explicitly, as it uses an "open" command, similar to macos but on other Unixes, open ends up translating to shell open fd
src/unix.rs:277
↓ 1 callers
Function
try_with_browser_env
(url: &str, options: &BrowserOptions)
src/unix.rs:92
↓ 1 callers
Function
try_wsl
Open browser in WSL environments
src/unix.rs:218
↓ 1 callers
Function
try_xdg
Dig into XDG settings (if xdg is available) to force it to open the browser, instead of the default application
src/unix.rs:287
↓ 1 callers
Function
wasm_console_log
Print to browser console
src/wasm.rs:42
↓ 1 callers
Method
with_dry_run
Do not do an actual execution, just return true if this would've likely succeeded. Note the "likely" here - it's still indicative than guaranteed.
src/lib.rs:241
↓ 1 callers
Function
wsl_get_filepath_from_url
(wc: &WindowsConfig, target: &TargetType)
src/unix.rs:736
↓ 1 callers
Function
wsl_path_lin2win
Converts a linux path to windows. We using `String` instead of `OsString` as return type because the `OsString` will be different b/w Windows & Linux.
src/unix.rs:770
↓ 1 callers
Function
wsl_path_win2lin
Converts a windows path to linux `PathBuf`
src/unix.rs:753
Function
android_main
(_app: android_activity::AndroidApp)
tests/test-android-app/src/lib.rs:4
Method
default
()
src/lib.rs:202
Function
delayed_response
(req: HttpRequest)
tests/common.rs:29
Method
deref
(&self)
src/lib.rs:395
Method
description
(&self)
src/lib.rs:143
Method
fmt
(&self, f: &mut fmt::Formatter)
src/lib.rs:137
Method
fmt
(&self, f: &mut std::fmt::Formatter<'_>)
src/android.rs:87
Method
from
(err: jni::errors::Error)
src/android.rs:77
Method
from_file_path
(value: &str)
src/lib.rs:379
Method
from_str
(s: &str)
src/lib.rs:165
Function
http_url_is_unchanged
()
src/windows.rs:190
Method
is_available
Returns true if there is likely a browser detected in the system
src/lib.rs:117
Function
local_drive_path_is_unchanged
()
src/windows.rs:181
Function
log_handler
(req: HttpRequest, data: web::Data<AppState>)
tests/common.rs:13
Method
new
Create a new instance. Configure it with one of the `with_` methods.
src/lib.rs:216
Method
openBrowser
()
tests/test-ios-app/test-ios-app/ContentView.swift:12
Function
open_browser_internal
Deal with opening a URL in wasm. This implementation ignores the browser attribute and always opens URLs in the same browser where wasm vm is running.
src/wasm.rs:5
Function
open_browser_internal
Deal with opening of browsers on Android. Only [Browser::Default] is supported, and in options, only [BrowserOptions::dry_run] is honoured.
src/android.rs:7
Function
open_browser_internal
Deal with opening of browsers on Windows. We first use [`AssocQueryStringW`](https://learn.microsoft.com/en-us/windows/win32/api/shlwapi/nf-shlwapi-a
src/windows.rs:28
Function
open_browser_internal
Deal with opening of browsers on Linux and *BSD - currently supports only the default browser The mechanism of opening the default browser is as foll
src/unix.rs:28
Function
open_non_existing_browser
()
src/macos.rs:136
Function
test_all_substitution
()
src/unix.rs:899
Function
test_android
()
tests/test_android.rs:20
Function
test_basic_substitution
()
src/unix.rs:890
Function
test_existence
()
src/macos.rs:150
Function
test_existence_default
()
tests/test_ios.rs:139
Function
test_existence_default
()
tests/test_unix.rs:19
Function
test_existence_default
()
tests/test_macos.rs:39
Function
test_existence_default
()
tests/test_windows.rs:23
Function
test_existence_default
()
tests/test_android.rs:92
Function
test_existence_safari
()
tests/test_macos.rs:44
Function
test_hardened_mode
()
tests/test_unix.rs:67
Function
test_hardened_mode
()
tests/test_macos.rs:95
Function
test_hardened_mode
()
tests/test_windows.rs:68
Function
test_ios
()
tests/test_ios.rs:20
Function
test_local_file_abs_path
()
tests/test_unix.rs:31
Function
test_local_file_abs_path
()
tests/test_macos.rs:59
Function
test_local_file_abs_path
()
tests/test_windows.rs:34
Function
test_local_file_rel_path
()
tests/test_unix.rs:41
Function
test_local_file_rel_path
()
tests/test_macos.rs:69
Function
test_local_file_rel_path
()
tests/test_windows.rs:43
Function
test_local_file_uri
()
tests/test_unix.rs:56
Function
test_local_file_uri
()
tests/test_macos.rs:84
Function
test_local_file_uri
()
tests/test_windows.rs:57
Function
test_no_substitution
()
src/unix.rs:910
Function
test_non_existence_safari
()
tests/test_unix.rs:24
Function
test_non_existence_safari
()
tests/test_windows.rs:28
next →
1–100 of 120, ranked by callers