_cef_command_line_t

Struct _cef_command_line_t 

Source
#[repr(C)]
pub struct _cef_command_line_t {
Show 22 fields pub base: cef_base_ref_counted_t, pub is_valid: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t) -> c_int>, pub is_read_only: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t) -> c_int>, pub copy: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t) -> *mut _cef_command_line_t>, pub init_from_argv: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, argc: c_int, argv: *const *const c_char)>, pub init_from_string: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, command_line: *const cef_string_t)>, pub reset: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t)>, pub get_argv: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, argv: cef_string_list_t)>, pub get_command_line_string: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t) -> cef_string_userfree_t>, pub get_program: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t) -> cef_string_userfree_t>, pub set_program: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, program: *const cef_string_t)>, pub has_switches: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t) -> c_int>, pub has_switch: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, name: *const cef_string_t) -> c_int>, pub get_switch_value: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, name: *const cef_string_t) -> cef_string_userfree_t>, pub get_switches: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, switches: cef_string_map_t)>, pub append_switch: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, name: *const cef_string_t)>, pub append_switch_with_value: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, name: *const cef_string_t, value: *const cef_string_t)>, pub has_arguments: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t) -> c_int>, pub get_arguments: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, arguments: cef_string_list_t)>, pub append_argument: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, argument: *const cef_string_t)>, pub prepend_wrapper: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, wrapper: *const cef_string_t)>, pub remove_switch: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, name: *const cef_string_t)>,
}
Expand description

Structure used to create and/or parse command line arguments. Arguments with “–”, “-” and, on Windows, “/” prefixes are considered switches. Switches will always precede any arguments without switch prefixes. Switches can optionally have a value specified using the “=” delimiter (e.g. “-switch=value”). An argument of “–” will terminate switch parsing with all subsequent tokens, regardless of prefix, being interpreted as non-switch arguments. Switch names should be lowercase ASCII and will be converted to such if necessary. Switch values will retain the original case and UTF8 encoding. This structure can be used before cef_initialize() is called.

NOTE: This struct is allocated DLL-side.

Fields§

§base: cef_base_ref_counted_t

Base structure.

§is_valid: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t) -> c_int>

Returns true (1) if this object is valid. Do not call any other functions if this function returns false (0).

§is_read_only: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t) -> c_int>

Returns true (1) if the values of this object are read-only. Some APIs may expose read-only objects.

§copy: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t) -> *mut _cef_command_line_t>

Returns a writable copy of this object.

§init_from_argv: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, argc: c_int, argv: *const *const c_char)>

Initialize the command line with the specified |argc| and |argv| values. The first argument must be the name of the program. This function is only supported on non-Windows platforms.

§init_from_string: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, command_line: *const cef_string_t)>

Initialize the command line with the string returned by calling GetCommandLineW(). This function is only supported on Windows.

§reset: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t)>

Reset the command-line switches and arguments but leave the program component unchanged.

§get_argv: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, argv: cef_string_list_t)>

Retrieve the original command line string as a vector of strings. The argv array: { program, [(--|-|/)switch[=value]]*, [--], [argument]* }

§get_command_line_string: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t) -> cef_string_userfree_t>

Constructs and returns the represented command line string. Use this function cautiously because quoting behavior is unclear.

§get_program: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t) -> cef_string_userfree_t>

Get the program part of the command line string (the first item).

§set_program: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, program: *const cef_string_t)>

Set the program part of the command line string (the first item).

§has_switches: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t) -> c_int>

Returns true (1) if the command line has switches.

§has_switch: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, name: *const cef_string_t) -> c_int>

Returns true (1) if the command line contains the given switch.

§get_switch_value: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, name: *const cef_string_t) -> cef_string_userfree_t>

Returns the value associated with the given switch. If the switch has no value or isn’t present this function returns the NULL string.

§get_switches: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, switches: cef_string_map_t)>

Returns the map of switch names and values. If a switch has no value an NULL string is returned.

§append_switch: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, name: *const cef_string_t)>

Add a switch to the end of the command line.

§append_switch_with_value: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, name: *const cef_string_t, value: *const cef_string_t)>

Add a switch with the specified value to the end of the command line. If the switch has no value pass an NULL value string.

§has_arguments: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t) -> c_int>

True if there are remaining command line arguments.

§get_arguments: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, arguments: cef_string_list_t)>

Get the remaining command line arguments.

§append_argument: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, argument: *const cef_string_t)>

Add an argument to the end of the command line.

§prepend_wrapper: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, wrapper: *const cef_string_t)>

Insert a command before the current command. Common for debuggers, like “valgrind” or “gdb –args”.

§remove_switch: Option<unsafe extern "C" fn(self_: *mut _cef_command_line_t, name: *const cef_string_t)>

Remove a switch from the command line. If no such switch is present, this has no effect.

Trait Implementations§

Source§

impl Clone for _cef_command_line_t

Source§

fn clone(&self) -> _cef_command_line_t

Returns a duplicate 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 _cef_command_line_t

Source§

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

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

impl Copy for _cef_command_line_t

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> 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 = 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.