pub enum LaunchArgValue {
Bool(bool),
Int(i32),
Long(i64),
Float(f32),
Text(String),
}Expand description
One launch-argument value, in the type the platform delivered it.
Android extras arrive already typed. The command-line and query-string
backends have no type information, so they deliver LaunchArgValue::Text
and let the typed accessors parse it.
Variants§
Bool(bool)
am start --ez name true, or a bare --name on the command line.
Int(i32)
am start --ei name 3.
Long(i64)
am start --el name 90000000000.
Float(f32)
am start --ef name 0.5 (Android double extras are narrowed here).
Text(String)
am start --es name lobby, or --name=lobby on the command line.
Trait Implementations§
Source§impl Clone for LaunchArgValue
impl Clone for LaunchArgValue
Source§fn clone(&self) -> LaunchArgValue
fn clone(&self) -> LaunchArgValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LaunchArgValue
impl Debug for LaunchArgValue
Source§impl PartialEq for LaunchArgValue
impl PartialEq for LaunchArgValue
impl StructuralPartialEq for LaunchArgValue
Auto Trait Implementations§
impl Freeze for LaunchArgValue
impl RefUnwindSafe for LaunchArgValue
impl Send for LaunchArgValue
impl Sync for LaunchArgValue
impl Unpin for LaunchArgValue
impl UnsafeUnpin for LaunchArgValue
impl UnwindSafe for LaunchArgValue
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