pub struct ByteArray(/* private fields */);
Expand description
A reference-counted vector of bytes that uses Godot’s pool allocator.
Implementations§
Source§impl ByteArray
impl ByteArray
Sourcepub fn from_variant_array(array: &VariantArray) -> ByteArray
pub fn from_variant_array(array: &VariantArray) -> ByteArray
Creates an array by trying to convert each variant.
When no viable conversion exists, the default value 0
is pushed.
Sourcepub fn push_array(&mut self, bytes: &ByteArray)
pub fn push_array(&mut self, bytes: &ByteArray)
Appends each byte to the end of the array.
Sourcepub fn resize(&mut self, size: i32)
pub fn resize(&mut self, size: i32)
Changes the size of the array, possibly removing elements or pushing default values.
pub fn new_ref(&self) -> ByteArray
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ByteArray
impl RefUnwindSafe for ByteArray
impl Send for ByteArray
impl Sync for ByteArray
impl Unpin for ByteArray
impl UnwindSafe for ByteArray
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