Struct binder_rust::Parcel [−][src]
pub struct Parcel { /* fields omitted */ }
Represents a binder serializable parcel
Implementations
impl Parcel
[src]
impl Parcel
[src]pub fn empty() -> Self
[src]
Create a new empty parcel.
pub fn from_slice(data: &[u8]) -> Self
[src]
Create a new empty parcel, with a reserved size
pub fn from_data_and_offsets(
data: *mut u8,
data_size: usize,
offsets: *mut usize,
offsets_size: usize
) -> Self
[src]
data: *mut u8,
data_size: usize,
offsets: *mut usize,
offsets_size: usize
) -> Self
pub fn reset(&mut self)
[src]
pub fn position(&self) -> u64
[src]
pub fn set_position(&mut self, pos: u64)
[src]
pub fn append_parcel(&mut self, other: &mut Parcel)
[src]
Append the contents of another parcel to this parcel
pub fn as_ptr(&self) -> *const u8
[src]
Retrieve the data of the parcel as a pointer
pub fn as_mut_ptr(&mut self) -> *mut u8
[src]
Retrieve the data of the parcel as a mutable pointer
pub fn to_slice(&self) -> &[u8]
[src]
Retrieve the data of the parce as a slice
pub fn len(&self) -> usize
[src]
Retrieve the size of the parcel’s data
pub fn offsets_len(&self) -> usize
[src]
Retrieve the number of object offsets
pub fn offsets(&mut self) -> &mut Vec<usize>
[src]
Retrieve the object offsets
pub fn has_unread_data(&self) -> bool
[src]
Check if the parcel has unread data
pub fn write_i32(&mut self, data: i32)
[src]
Write an i32 to the parcel
pub fn write_u32(&mut self, data: u32)
[src]
Write an u32 to the parcel
pub fn write_u16(&mut self, data: u16)
[src]
Write an u16 to the parcel
pub fn write_bool(&mut self, data: bool)
[src]
Write a bool to the parcel
pub fn read_i32(&mut self) -> i32
[src]
Read an i32 from the parcel
pub fn write(&mut self, data: &[u8])
[src]
Write a slice of data to the parcel
pub fn write_transaction_data(&mut self, data: &BinderTransactionData)
[src]
Write a BinderTransactionData struct into the parcel
pub fn read_u32(&mut self) -> u32
[src]
Read an u32 from the parcel
pub fn read_u64(&mut self) -> u64
[src]
Read an u64 from the parcel
pub fn read_usize(&mut self) -> usize
[src]
Read an usize from the parcel
pub fn read_pointer(&mut self) -> *const c_void
[src]
Read a void pointer from the parcel
pub fn read(&mut self, size: usize) -> Vec<u8>
[src]
Read a slice of size bytes from the parcel
pub fn read_without_alignment(&mut self, size: usize) -> Vec<u8>
[src]
Read a slice of size bytes from the parcel
pub fn read_transaction_data(&mut self) -> BinderTransactionData
[src]
Read a BinderTransactionData from the parcel
pub fn read_object<T>(&mut self) -> T
[src]
Read an object of type T from the parcel
pub fn write_object<T>(&mut self, object: T)
[src]
pub fn write_str16(&mut self, string: &str)
[src]
Write a string to the parcel
pub fn write_binder(&mut self, object: *const c_void)
[src]
Write a Binder object into the parcel
pub fn write_file_descriptor(&mut self, fd: RawFd, take_ownership: bool)
[src]
Write a file descriptor into the parcel
pub fn read_file_descriptor(&mut self) -> RawFd
[src]
REad a file descriptor from the parcel
pub fn read_str16(&mut self) -> String
[src]
Read a string from the parcel
pub fn read_str(&mut self) -> String
[src]
Read a string from the parcel
pub fn read_interface_token(&mut self) -> String
[src]
Read an interface token from the parcel
pub fn write_interface_token(&mut self, name: &str)
[src]
Write an interface token to the parcel
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Parcel
impl RefUnwindSafe for Parcel
impl UnwindSafe for Parcel
impl UnwindSafe for Parcel