pub struct OpenUrlCommandBuilder { /* private fields */ }Expand description
Builder for a command that opens a URL in the system’s default browser.
Implementations§
Source§impl OpenUrlCommandBuilder
impl OpenUrlCommandBuilder
Sourcepub fn new(target: String) -> Self
pub fn new(target: String) -> Self
Creates a new OpenUrlCommandBuilder with a static target URL.
Sourcepub fn new_dyn<F>(target_fn: F) -> Self
pub fn new_dyn<F>(target_fn: F) -> Self
Creates a new OpenUrlCommandBuilder with a function that returns the target URL.
Sourcepub fn base(self, base: ComObject<BaseCommand>) -> Self
pub fn base(self, base: ComObject<BaseCommand>) -> Self
Overrides the base command with a custom one.
By default, it uses a command with the name “Open” and an OpenInNewWindow icon “\u{E8A7}”.
Sourcepub fn result(self, result: CommandResult) -> Self
pub fn result(self, result: CommandResult) -> Self
Overrides the action to be performed when the URL is opened.
By default, it is set to CommandResult::Dismiss.
Trait Implementations§
Source§impl ComBuilder for OpenUrlCommandBuilder
impl ComBuilder for OpenUrlCommandBuilder
type Output = InvokableCommand
Source§fn build_unmanaged(self) -> InvokableCommand
fn build_unmanaged(self) -> InvokableCommand
Build the unmanaged object.
Auto Trait Implementations§
impl !RefUnwindSafe for OpenUrlCommandBuilder
impl !UnwindSafe for OpenUrlCommandBuilder
impl Freeze for OpenUrlCommandBuilder
impl Send for OpenUrlCommandBuilder
impl Sync for OpenUrlCommandBuilder
impl Unpin for OpenUrlCommandBuilder
impl UnsafeUnpin for OpenUrlCommandBuilder
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
Mutably borrows from an owned value. Read more