pub struct Dynamic { /* private fields */ }Implementations§
Source§impl Dynamic
impl Dynamic
pub fn call_function( &self, function: DString, parameters: &mut [UnverifiedDartHandle], ) -> Result<Dynamic, Error>
pub fn get_field(&self, field: DString) -> Result<Dynamic, Error>
pub fn set_field( &self, field: DString, value: UnverifiedDartHandle, ) -> Result<(), Error>
pub fn get_property(&self, property: DString) -> Result<Dynamic, Error>
pub fn set_property( &self, property: DString, value: UnverifiedDartHandle, ) -> Result<(), Error>
pub fn get_type(&self) -> Dynamic
pub fn type_name(&self) -> String
pub fn call_as_function( &self, parameters: &mut [UnverifiedDartHandle], ) -> Result<Dynamic, Error>
pub fn from<T: DartHandle>(x: T) -> Self
Methods from Deref<Target = UnverifiedDartHandle>§
Sourcepub fn to_string(&self) -> Result<CString, Error>
pub fn to_string(&self) -> Result<CString, Error>
Calls Object.toString()
on an object and returns a CString should it succeed, or
Sourcepub fn is_null(&self) -> bool
pub fn is_null(&self) -> bool
Checks if a handle is to the Null
object.
See Dart_IsNull for more information.
Sourcepub fn equals(&self, other: Self) -> Result<bool, Error>
pub fn equals(&self, other: Self) -> Result<bool, Error>
Checks equality. Not too sure what this does different from identical.
See Dart_ObjectEquals for more information.
Sourcepub fn instanceof(&self, ty: Self) -> Result<bool, Error>
pub fn instanceof(&self, ty: Self) -> Result<bool, Error>
Is self instanceof ty? ty must be a Type.
See Dart_ObjectIsType for more information.
Sourcepub fn is_instance(&self) -> bool
pub fn is_instance(&self) -> bool
Is self an instance of an object?
See Dart_IsInstance for more information.
pub fn is_integer(&self) -> bool
pub fn is_double(&self) -> bool
pub fn is_boolean(&self) -> bool
pub fn is_string(&self) -> bool
pub fn is_string_latin1(&self) -> bool
pub fn is_external_string(&self) -> bool
pub fn is_list(&self) -> bool
pub fn is_map(&self) -> bool
pub fn is_library(&self) -> bool
pub fn is_type(&self) -> bool
pub fn is_function(&self) -> bool
pub fn is_variable(&self) -> bool
Sourcepub fn is_type_variable(&self) -> bool
pub fn is_type_variable(&self) -> bool
Is self the type variable in a generic function or type?
void Foo<T>() {}
^-- Type variablepub fn is_closure(&self) -> bool
pub fn is_typed_data(&self) -> bool
pub fn is_byte_buffer(&self) -> bool
pub fn is_future(&self) -> bool
pub fn get_instance_type(&self) -> Result<Self, Error>
pub fn get_class_name(&self) -> Result<Self, Error>
pub fn get_function_name(&self) -> Result<Self, Error>
pub fn get_function_owner(&self) -> Result<Self, Error>
pub fn function_is_static(&self) -> Result<bool, Error>
Sourcepub fn is_tear_off(&self) -> bool
pub fn is_tear_off(&self) -> bool
A tear off is when you create an implicit closure which calls a single function on an object:
var someList = <String>[];
var anotherList = ['a', 'b', 'c'];
anotherList.forEach(someList.add); //Tearing off here gives me
//a void Function(String).pub fn function_from_closure(&self) -> Result<Self, Error>
pub fn library_from_class(&self) -> Result<Self, Error>
pub fn integer_fits_in_i64(&self) -> Result<bool, Error>
pub fn integer_fits_in_u64(&self) -> Result<bool, Error>
pub fn get_i64(&self) -> Result<i64, Error>
pub fn get_u64(&self) -> Result<u64, Error>
pub fn get_integer_hex_string(&self) -> Result<CString, Error>
pub fn get_f64(&self) -> Result<f64, Error>
pub fn get_bool(&self) -> Result<bool, Error>
pub fn string_length(&self) -> Result<usize, Error>
pub fn string_to_cstring(&self) -> Result<CString, Error>
pub fn string_to_utf8(&self) -> Result<String, Error>
pub fn string_storage_size(&self) -> Result<usize, Error>
pub fn new_list_of_self_as_type(&self, length: usize) -> Result<Self, Error>
pub fn list_length(&self) -> Result<usize, Error>
pub fn list_at(&self, index: usize) -> Result<Self, Error>
pub fn list_get_range( &self, range: impl RangeBounds<usize>, ) -> Result<Self, Error>
pub fn list_set_at(&self, item: Self, index: usize) -> Result<(), Error>
pub fn map_get_at(&self, key: Self) -> Result<Option<Self>, Error>
pub fn map_contains_key(&self, key: Self) -> Result<Self, Error>
pub fn map_keys(&self) -> Result<Self, Error>
pub fn typed_data_get_type(&self) -> Dart_TypedData_Type
pub fn external_typed_data_get_type(&self) -> Dart_TypedData_Type
pub fn new_of_type_self( &self, constructor_name: Option<Self>, args: &mut [Self], ) -> Result<Self, Error>
pub fn allocate_of_type_self(&self) -> Result<Self, Error>
Sourcepub fn invoke(
&self,
function_name: Self,
args: &mut [Self],
) -> Result<Self, Error>
pub fn invoke( &self, function_name: Self, args: &mut [Self], ) -> Result<Self, Error>
Invokes a method on self, where self may be a:
- Instance: Invokes a member method.
- Class: Invokes a static method.
- Library: Invokes a static top level method.
See Dart_Invoke for more information.
pub fn invoke_closure(&self, args: &mut [Self]) -> Result<Self, Error>
Sourcepub fn invoke_self_constructor(
&self,
name: Option<Self>,
args: &mut [Self],
) -> Result<Self, Error>
pub fn invoke_self_constructor( &self, name: Option<Self>, args: &mut [Self], ) -> Result<Self, Error>
Invokes the constructor on a type, using the default
constructor if name is None.
See Dart_InvokeConstructor for more information.
pub fn get_field(&self, name: Self) -> Result<Self, Error>
pub fn set_field(&self, name: Self, value: Self) -> Result<(), Error>
pub fn get_library_url_import(&self) -> Result<Self, Error>
pub fn get_library_url_path(&self) -> Result<Self, Error>
pub fn get_loaded_libraries(&self) -> Result<Self, Error>
Sourcepub fn op_add(&self, other: Self) -> Result<Self, Error>
pub fn op_add(&self, other: Self) -> Result<Self, Error>
Invokes an operator for an instance. These methods are shorthand
instead of directly using invoke. These methods will just use the
operator as the name of the method (+ for add, - for sub, etc.).
op_add: Addition (+).op_sub: Subtraction (-).op_mul: Multiplication (*).op_div: Double Division (/).op_rem: Remainder Division (%).op_flr_div: Integer Division (~/).op_neg: Unary Negation (-,unary-).op_eq: Test for overloadable equality (==).op_gt,op_gte,op_lt,op_lte: Comparison (>,>=,<,<=).op_bitand: Binaryand-ing (&).op_bitor: Binaryor-ing (|).op_bitxor: Binaryxor-ing (^).op_bit_not: Binarynot-ing (~).op_shl: Binary left shift bits (<<).op_shr: Binary right shift bits (>>).op_idx: Indexing ([]).op_idx_assign: Assignment to index ([]=).
pub fn op_sub(&self, other: Self) -> Result<Self, Error>
pub fn op_mul(&self, other: Self) -> Result<Self, Error>
pub fn op_div(&self, other: Self) -> Result<Self, Error>
pub fn op_rem(&self, other: Self) -> Result<Self, Error>
pub fn op_flr_div(&self, other: Self) -> Result<Self, Error>
pub fn op_neg(&self) -> Result<Self, Error>
pub fn op_eq(&self, other: Self) -> Result<Self, Error>
pub fn op_gt(&self, other: Self) -> Result<Self, Error>
pub fn op_gte(&self, other: Self) -> Result<Self, Error>
pub fn op_lt(&self, other: Self) -> Result<Self, Error>
pub fn op_lte(&self, other: Self) -> Result<Self, Error>
pub fn op_bitand(&self, other: Self) -> Result<Self, Error>
pub fn op_bitor(&self, other: Self) -> Result<Self, Error>
pub fn op_bitxor(&self, other: Self) -> Result<Self, Error>
pub fn op_bit_not(&self) -> Result<Self, Error>
pub fn op_shl(&self, other: Self) -> Result<Self, Error>
pub fn op_shr(&self, other: Self) -> Result<Self, Error>
pub fn op_idx(&self, idx: Self) -> Result<Self, Error>
pub fn op_idx_assign(&self, idx: Self, value: Self) -> Result<(), Error>
Trait Implementations§
Source§impl<'a> AddAssign<&'a Dynamic> for Dynamic
impl<'a> AddAssign<&'a Dynamic> for Dynamic
Source§fn add_assign(&mut self, other: &'a Dynamic)
fn add_assign(&mut self, other: &'a Dynamic)
+= operation. Read moreSource§impl AddAssign for Dynamic
impl AddAssign for Dynamic
Source§fn add_assign(&mut self, other: Dynamic)
fn add_assign(&mut self, other: Dynamic)
+= operation. Read moreSource§impl<'a> BitAndAssign<&'a Dynamic> for Dynamic
impl<'a> BitAndAssign<&'a Dynamic> for Dynamic
Source§fn bitand_assign(&mut self, other: &'a Dynamic)
fn bitand_assign(&mut self, other: &'a Dynamic)
&= operation. Read moreSource§impl BitAndAssign for Dynamic
impl BitAndAssign for Dynamic
Source§fn bitand_assign(&mut self, other: Dynamic)
fn bitand_assign(&mut self, other: Dynamic)
&= operation. Read moreSource§impl<'a> BitOrAssign<&'a Dynamic> for Dynamic
impl<'a> BitOrAssign<&'a Dynamic> for Dynamic
Source§fn bitor_assign(&mut self, other: &'a Dynamic)
fn bitor_assign(&mut self, other: &'a Dynamic)
|= operation. Read moreSource§impl BitOrAssign for Dynamic
impl BitOrAssign for Dynamic
Source§fn bitor_assign(&mut self, other: Dynamic)
fn bitor_assign(&mut self, other: Dynamic)
|= operation. Read moreSource§impl<'a> BitXorAssign<&'a Dynamic> for Dynamic
impl<'a> BitXorAssign<&'a Dynamic> for Dynamic
Source§fn bitxor_assign(&mut self, other: &'a Dynamic)
fn bitxor_assign(&mut self, other: &'a Dynamic)
^= operation. Read moreSource§impl BitXorAssign for Dynamic
impl BitXorAssign for Dynamic
Source§fn bitxor_assign(&mut self, other: Dynamic)
fn bitxor_assign(&mut self, other: Dynamic)
^= operation. Read moreSource§impl DartHandle for Dynamic
impl DartHandle for Dynamic
Source§fn handle(&self) -> Dart_Handle
fn handle(&self) -> Dart_Handle
Source§fn safe_handle(&self) -> UnverifiedDartHandle
fn safe_handle(&self) -> UnverifiedDartHandle
Source§fn from_handle(
handle: UnverifiedDartHandle,
) -> Result<Self, UnverifiedDartHandle>
fn from_handle( handle: UnverifiedDartHandle, ) -> Result<Self, UnverifiedDartHandle>
Source§impl<'a> DivAssign<&'a Dynamic> for Dynamic
impl<'a> DivAssign<&'a Dynamic> for Dynamic
Source§fn div_assign(&mut self, other: &'a Dynamic)
fn div_assign(&mut self, other: &'a Dynamic)
/= operation. Read moreSource§impl DivAssign for Dynamic
impl DivAssign for Dynamic
Source§fn div_assign(&mut self, other: Dynamic)
fn div_assign(&mut self, other: Dynamic)
/= operation. Read moreSource§impl<'a> MulAssign<&'a Dynamic> for Dynamic
impl<'a> MulAssign<&'a Dynamic> for Dynamic
Source§fn mul_assign(&mut self, other: &'a Dynamic)
fn mul_assign(&mut self, other: &'a Dynamic)
*= operation. Read moreSource§impl MulAssign for Dynamic
impl MulAssign for Dynamic
Source§fn mul_assign(&mut self, other: Dynamic)
fn mul_assign(&mut self, other: Dynamic)
*= operation. Read moreSource§impl<'a> RemAssign<&'a Dynamic> for Dynamic
impl<'a> RemAssign<&'a Dynamic> for Dynamic
Source§fn rem_assign(&mut self, other: &'a Dynamic)
fn rem_assign(&mut self, other: &'a Dynamic)
%= operation. Read moreSource§impl RemAssign for Dynamic
impl RemAssign for Dynamic
Source§fn rem_assign(&mut self, other: Dynamic)
fn rem_assign(&mut self, other: Dynamic)
%= operation. Read moreSource§impl<'a> ShlAssign<&'a Dynamic> for Dynamic
impl<'a> ShlAssign<&'a Dynamic> for Dynamic
Source§fn shl_assign(&mut self, other: &'a Dynamic)
fn shl_assign(&mut self, other: &'a Dynamic)
<<= operation. Read moreSource§impl ShlAssign for Dynamic
impl ShlAssign for Dynamic
Source§fn shl_assign(&mut self, other: Dynamic)
fn shl_assign(&mut self, other: Dynamic)
<<= operation. Read moreSource§impl<'a> ShrAssign<&'a Dynamic> for Dynamic
impl<'a> ShrAssign<&'a Dynamic> for Dynamic
Source§fn shr_assign(&mut self, other: &'a Dynamic)
fn shr_assign(&mut self, other: &'a Dynamic)
>>= operation. Read moreSource§impl ShrAssign for Dynamic
impl ShrAssign for Dynamic
Source§fn shr_assign(&mut self, other: Dynamic)
fn shr_assign(&mut self, other: Dynamic)
>>= operation. Read moreSource§impl<'a> SubAssign<&'a Dynamic> for Dynamic
impl<'a> SubAssign<&'a Dynamic> for Dynamic
Source§fn sub_assign(&mut self, other: &'a Dynamic)
fn sub_assign(&mut self, other: &'a Dynamic)
-= operation. Read moreSource§impl SubAssign for Dynamic
impl SubAssign for Dynamic
Source§fn sub_assign(&mut self, other: Dynamic)
fn sub_assign(&mut self, other: Dynamic)
-= operation. Read more