### is
Overload | Description |
---|---|
is<T>(obj: *) -> Bool |
Returns true if obj is bindable to the type T
|
Overload | Description |
---|---|
as<T>(obj: *) -> 'T |
Coerces obj to the type T . This does not transform the underlying data,
only dynamically checks if it is safe to "trick" the type system. This is useful when dealing with
the different variants of sum types.
|
Overload | Description |
---|---|
drop<T>(obj: @'T) -> () |
Deletes the contents to which obj is pointing. You cannot access the data after this
and every other reference pointing to that data becomes invalid
|
Overload | Description |
---|---|
move<T>(obj: @'T) -> 'T |
Moves the contents to which obj is pointing to a fresh object of type 'T . You cannot access
the data after this from any reference to the previous location
|
Overload | Description |
---|---|
swap<T>(a: @'T, b: @'T) -> () |
Interchanges the contents to which a and b are pointing.
|
Overload | Description |
---|---|
ref<T>(obj: 'T) -> &'T |
Creates a reference to obj
|
Overload | Description |
---|---|
mut<T>(obj: 'T) -> @'T |
Creates a mutable reference to obj
|
Overload | Description |
---|---|
mut<T>(obj: &'T) -> 'T |
Copies the contents to which obj is pointing
|
mut<T>(obj: @'T) -> 'T |
Overload | Description |
---|---|
mut<T>(obj: @'T) -> &'T |
Creates a reference to obj from a mutable reference
|
Overload | Description |
---|---|
fwd<T>(obj: *) -> 'T |
Takes obj and tries to convert it to the type T :
|
Overload | Description |
---|---|
cfwd<T>(obj: *) -> 'T |
The same as fwd , but clones objects instead of moving them
|