[−]Struct dart::dart_types::list::List
Methods
impl<T: DartType> List<T>
impl List<UnverifiedDartHandle>
pub fn new_dynamic(length: usize) -> Self
impl<T: TypedData> List<T>
impl List<Integer>
pub fn new_integer(len: usize) -> Self
impl List<String>
pub fn new_integer(len: usize) -> Self
impl<T> List<T>
pub fn length(&self) -> usize
pub fn get_range(&self, range: impl RangeBounds<usize>) -> Result<Self, Error>
pub fn iterator(&self) -> Result<UnverifiedDartHandle, Error>
pub fn reversed(&self) -> Result<UnverifiedDartHandle, Error>
Methods from Deref<Target = UnverifiedDartHandle>
pub fn to_string(&self) -> Result<CString, Error>
[src]
Calls Object.toString()
on an object and returns a CString
should it succeed, or
pub fn is_null(&self) -> bool
[src]
Checks if a handle is to the Null
object.
See Dart_IsNull
for more information.
pub fn equals(&self, other: Self) -> Result<bool, Error>
[src]
Checks equality. Not too sure what this does different from identical
.
See Dart_ObjectEquals
for more information.
pub fn instanceof(&self, ty: Self) -> Result<bool, Error>
[src]
Is self
instanceof ty? ty
must be a Type
.
See Dart_ObjectIsType
for more information.
pub fn is_instance(&self) -> bool
[src]
Is self
an instance of an object?
See Dart_IsInstance
for more information.
pub fn is_integer(&self) -> bool
[src]
pub fn is_double(&self) -> bool
[src]
pub fn is_boolean(&self) -> bool
[src]
pub fn is_string(&self) -> bool
[src]
pub fn is_string_latin1(&self) -> bool
[src]
pub fn is_external_string(&self) -> bool
[src]
pub fn is_list(&self) -> bool
[src]
pub fn is_map(&self) -> bool
[src]
pub fn is_library(&self) -> bool
[src]
pub fn is_type(&self) -> bool
[src]
pub fn is_function(&self) -> bool
[src]
pub fn is_variable(&self) -> bool
[src]
pub fn is_type_variable(&self) -> bool
[src]
Is self
the type variable in a generic function or type?
void Foo<T>() {} ^-- Type variable
pub fn is_closure(&self) -> bool
[src]
pub fn is_typed_data(&self) -> bool
[src]
pub fn is_byte_buffer(&self) -> bool
[src]
pub fn is_future(&self) -> bool
[src]
pub fn get_instance_type(&self) -> Result<Self, Error>
[src]
pub fn get_class_name(&self) -> Result<Self, Error>
[src]
pub fn get_function_name(&self) -> Result<Self, Error>
[src]
pub fn get_function_owner(&self) -> Result<Self, Error>
[src]
pub fn function_is_static(&self) -> Result<bool, Error>
[src]
pub fn is_tear_off(&self) -> bool
[src]
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>
[src]
pub fn library_from_class(&self) -> Result<Self, Error>
[src]
pub fn integer_fits_in_i64(&self) -> Result<bool, Error>
[src]
pub fn integer_fits_in_u64(&self) -> Result<bool, Error>
[src]
pub fn get_i64(&self) -> Result<i64, Error>
[src]
pub fn get_u64(&self) -> Result<u64, Error>
[src]
pub fn get_integer_hex_string(&self) -> Result<CString, Error>
[src]
pub fn get_f64(&self) -> Result<f64, Error>
[src]
pub fn get_bool(&self) -> Result<bool, Error>
[src]
pub fn string_length(&self) -> Result<usize, Error>
[src]
pub fn string_to_cstring(&self) -> Result<CString, Error>
[src]
pub fn string_to_utf8(&self) -> Result<String, Error>
[src]
pub fn string_storage_size(&self) -> Result<usize, Error>
[src]
pub fn new_list_of_self_as_type(&self, length: usize) -> Result<Self, Error>
[src]
pub fn list_length(&self) -> Result<usize, Error>
[src]
pub fn list_at(&self, index: usize) -> Result<Self, Error>
[src]
pub fn list_get_range(
&self,
range: impl RangeBounds<usize>
) -> Result<Self, Error>
[src]
&self,
range: impl RangeBounds<usize>
) -> Result<Self, Error>
pub fn list_set_at(&self, item: Self, index: usize) -> Result<(), Error>
[src]
pub fn map_get_at(&self, key: Self) -> Result<Option<Self>, Error>
[src]
pub fn map_contains_key(&self, key: Self) -> Result<Self, Error>
[src]
pub fn map_keys(&self) -> Result<Self, Error>
[src]
pub fn typed_data_get_type(&self) -> Dart_TypedData_Type
[src]
pub fn external_typed_data_get_type(&self) -> Dart_TypedData_Type
[src]
pub fn new_of_type_self(
&self,
constructor_name: Option<Self>,
args: &mut [Self]
) -> Result<Self, Error>
[src]
&self,
constructor_name: Option<Self>,
args: &mut [Self]
) -> Result<Self, Error>
pub fn allocate_of_type_self(&self) -> Result<Self, Error>
[src]
pub fn invoke(
&self,
function_name: Self,
args: &mut [Self]
) -> Result<Self, Error>
[src]
&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>
[src]
pub fn invoke_self_constructor(
&self,
name: Option<Self>,
args: &mut [Self]
) -> Result<Self, Error>
[src]
&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>
[src]
pub fn set_field(&self, name: Self, value: Self) -> Result<(), Error>
[src]
pub fn get_library_url_import(&self) -> Result<Self, Error>
[src]
pub fn get_library_url_path(&self) -> Result<Self, Error>
[src]
pub fn get_loaded_libraries(&self) -> Result<Self, Error>
[src]
pub fn op_add(&self, other: Self) -> Result<Self, Error>
[src]
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>
[src]
pub fn op_mul(&self, other: Self) -> Result<Self, Error>
[src]
pub fn op_div(&self, other: Self) -> Result<Self, Error>
[src]
pub fn op_rem(&self, other: Self) -> Result<Self, Error>
[src]
pub fn op_flr_div(&self, other: Self) -> Result<Self, Error>
[src]
pub fn op_neg(&self) -> Result<Self, Error>
[src]
pub fn op_eq(&self, other: Self) -> Result<Self, Error>
[src]
pub fn op_gt(&self, other: Self) -> Result<Self, Error>
[src]
pub fn op_gte(&self, other: Self) -> Result<Self, Error>
[src]
pub fn op_lt(&self, other: Self) -> Result<Self, Error>
[src]
pub fn op_lte(&self, other: Self) -> Result<Self, Error>
[src]
pub fn op_bitand(&self, other: Self) -> Result<Self, Error>
[src]
pub fn op_bitor(&self, other: Self) -> Result<Self, Error>
[src]
pub fn op_bitxor(&self, other: Self) -> Result<Self, Error>
[src]
pub fn op_bit_not(&self) -> Result<Self, Error>
[src]
pub fn op_shl(&self, other: Self) -> Result<Self, Error>
[src]
pub fn op_shr(&self, other: Self) -> Result<Self, Error>
[src]
pub fn op_idx(&self, idx: Self) -> Result<Self, Error>
[src]
pub fn op_idx_assign(&self, idx: Self, value: Self) -> Result<(), Error>
[src]
Trait Implementations
impl<T: Clone> Clone for List<T>
fn clone(&self) -> List<T>
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: Copy> Copy for List<T>
impl<T: 'static> DartHandle for List<T>
fn handle(&self) -> Dart_Handle
fn safe_handle(&self) -> UnverifiedDartHandle
fn from_handle(
handle: UnverifiedDartHandle
) -> Result<Self, UnverifiedDartHandle>
handle: UnverifiedDartHandle
) -> Result<Self, UnverifiedDartHandle>
impl<T: DartType> DartType for List<T>
const THIS: &'static LocalKey<UnverifiedDartHandle>
impl<T> Deref for List<T>
type Target = UnverifiedDartHandle
The resulting type after dereferencing.
fn deref(&self) -> &UnverifiedDartHandle
impl ListLike<Double> for List<f32>
fn get_first(&self) -> Double
fn get_last(&self) -> Double
fn set_at(&mut self, idx: usize, item: Double) -> Result<(), Error>
fn get_at(&self, idx: usize) -> Result<Double, Error>
fn len(&self) -> usize
fn slice<Q: RangeBounds<usize>>(&self, slice: Q) -> ListView<T, Self>
fn slice_mut<Q: RangeBounds<usize>>(&mut self, slice: Q) -> ListViewMut<T, Self> where
T: Clone,
T: Clone,
impl ListLike<Double> for List<f64>
fn get_first(&self) -> Double
fn get_last(&self) -> Double
fn set_at(&mut self, idx: usize, item: Double) -> Result<(), Error>
fn get_at(&self, idx: usize) -> Result<Double, Error>
fn len(&self) -> usize
fn slice<Q: RangeBounds<usize>>(&self, slice: Q) -> ListView<T, Self>
fn slice_mut<Q: RangeBounds<usize>>(&mut self, slice: Q) -> ListViewMut<T, Self> where
T: Clone,
T: Clone,
impl ListLike<Integer> for List<u8>
fn get_first(&self) -> Integer
fn get_last(&self) -> Integer
fn set_at(&mut self, idx: usize, item: Integer) -> Result<(), Error>
fn get_at(&self, idx: usize) -> Result<Integer, Error>
fn len(&self) -> usize
fn slice<Q: RangeBounds<usize>>(&self, slice: Q) -> ListView<T, Self>
fn slice_mut<Q: RangeBounds<usize>>(&mut self, slice: Q) -> ListViewMut<T, Self> where
T: Clone,
T: Clone,
impl ListLike<Integer> for List<i8>
fn get_first(&self) -> Integer
fn get_last(&self) -> Integer
fn set_at(&mut self, idx: usize, item: Integer) -> Result<(), Error>
fn get_at(&self, idx: usize) -> Result<Integer, Error>
fn len(&self) -> usize
fn slice<Q: RangeBounds<usize>>(&self, slice: Q) -> ListView<T, Self>
fn slice_mut<Q: RangeBounds<usize>>(&mut self, slice: Q) -> ListViewMut<T, Self> where
T: Clone,
T: Clone,
impl ListLike<Integer> for List<u16>
fn get_first(&self) -> Integer
fn get_last(&self) -> Integer
fn set_at(&mut self, idx: usize, item: Integer) -> Result<(), Error>
fn get_at(&self, idx: usize) -> Result<Integer, Error>
fn len(&self) -> usize
fn slice<Q: RangeBounds<usize>>(&self, slice: Q) -> ListView<T, Self>
fn slice_mut<Q: RangeBounds<usize>>(&mut self, slice: Q) -> ListViewMut<T, Self> where
T: Clone,
T: Clone,
impl ListLike<Integer> for List<i16>
fn get_first(&self) -> Integer
fn get_last(&self) -> Integer
fn set_at(&mut self, idx: usize, item: Integer) -> Result<(), Error>
fn get_at(&self, idx: usize) -> Result<Integer, Error>
fn len(&self) -> usize
fn slice<Q: RangeBounds<usize>>(&self, slice: Q) -> ListView<T, Self>
fn slice_mut<Q: RangeBounds<usize>>(&mut self, slice: Q) -> ListViewMut<T, Self> where
T: Clone,
T: Clone,
impl ListLike<Integer> for List<u32>
fn get_first(&self) -> Integer
fn get_last(&self) -> Integer
fn set_at(&mut self, idx: usize, item: Integer) -> Result<(), Error>
fn get_at(&self, idx: usize) -> Result<Integer, Error>
fn len(&self) -> usize
fn slice<Q: RangeBounds<usize>>(&self, slice: Q) -> ListView<T, Self>
fn slice_mut<Q: RangeBounds<usize>>(&mut self, slice: Q) -> ListViewMut<T, Self> where
T: Clone,
T: Clone,
impl ListLike<Integer> for List<i32>
fn get_first(&self) -> Integer
fn get_last(&self) -> Integer
fn set_at(&mut self, idx: usize, item: Integer) -> Result<(), Error>
fn get_at(&self, idx: usize) -> Result<Integer, Error>
fn len(&self) -> usize
fn slice<Q: RangeBounds<usize>>(&self, slice: Q) -> ListView<T, Self>
fn slice_mut<Q: RangeBounds<usize>>(&mut self, slice: Q) -> ListViewMut<T, Self> where
T: Clone,
T: Clone,
impl ListLike<Integer> for List<u64>
fn get_first(&self) -> Integer
fn get_last(&self) -> Integer
fn set_at(&mut self, idx: usize, item: Integer) -> Result<(), Error>
fn get_at(&self, idx: usize) -> Result<Integer, Error>
fn len(&self) -> usize
fn slice<Q: RangeBounds<usize>>(&self, slice: Q) -> ListView<T, Self>
fn slice_mut<Q: RangeBounds<usize>>(&mut self, slice: Q) -> ListViewMut<T, Self> where
T: Clone,
T: Clone,
impl ListLike<Integer> for List<i64>
fn get_first(&self) -> Integer
fn get_last(&self) -> Integer
fn set_at(&mut self, idx: usize, item: Integer) -> Result<(), Error>
fn get_at(&self, idx: usize) -> Result<Integer, Error>
fn len(&self) -> usize
fn slice<Q: RangeBounds<usize>>(&self, slice: Q) -> ListView<T, Self>
fn slice_mut<Q: RangeBounds<usize>>(&mut self, slice: Q) -> ListViewMut<T, Self> where
T: Clone,
T: Clone,
impl<T: DartType> ListLike<T> for List<T>
fn get_first(&self) -> T
fn get_last(&self) -> T
fn set_at(&mut self, idx: usize, item: T) -> Result<(), Error>
fn get_at(&self, idx: usize) -> Result<T, Error>
fn len(&self) -> usize
fn slice<Q: RangeBounds<usize>>(&self, slice: Q) -> ListView<T, Self>
fn slice_mut<Q: RangeBounds<usize>>(&mut self, slice: Q) -> ListViewMut<T, Self> where
T: Clone,
T: Clone,
impl ListLike<UnverifiedDartHandle> for List<UnverifiedDartHandle>
fn get_first(&self) -> UnverifiedDartHandle
fn get_last(&self) -> UnverifiedDartHandle
fn set_at(
&mut self,
idx: usize,
item: UnverifiedDartHandle
) -> Result<(), Error>
&mut self,
idx: usize,
item: UnverifiedDartHandle
) -> Result<(), Error>
fn get_at(&self, idx: usize) -> Result<UnverifiedDartHandle, Error>
fn len(&self) -> usize
fn slice<Q: RangeBounds<usize>>(&self, slice: Q) -> ListView<T, Self>
fn slice_mut<Q: RangeBounds<usize>>(&mut self, slice: Q) -> ListViewMut<T, Self> where
T: Clone,
T: Clone,
Auto Trait Implementations
impl<T> RefUnwindSafe for List<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> !Send for List<T>
impl<T> !Sync for List<T>
impl<T> Unpin for List<T>
impl<T> UnwindSafe for List<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,