Lines Matching defs:MsgParcel

41 /// Ipc MsgParcel
42 pub struct MsgParcel {
46 unsafe impl Send for MsgParcel {}
49 impl MsgParcel {
50 /// Creates a new, empty MsgParcel.
57 /// use ipc::parcel::MsgParcel;
59 /// let msg = MsgParcel::new();
69 /// create MsgParcel from raw ptr
85 /// Writes a [`Serialize`] value into this MsgParcel.
91 /// use ipc::parcel::{MsgParcel, Serialize};
98 /// fn serialize(&self, parcel: &mut MsgParcel) -> IpcResult<()> {
103 /// let mut msg = MsgParcel::new();
111 /// Reads a [`Deserialize`] value out of this MsgParcel.
117 /// use ipc::parcel::{Deserialize, MsgParcel, Serialize};
124 /// fn serialize(&self, parcel: &mut MsgParcel) -> IpcResult<()> {
129 /// fn deserialize(parcel: &mut MsgParcel) -> IpcResult<Self> {
133 /// let mut msg = MsgParcel::new();
142 /// Writes a interface token into this MsgParcel.
146 /// use ipc::parcel::MsgParcel;
148 /// let mut msg = MsgParcel::new();
155 /// Reads a interface token from this MsgParcel.
159 /// use ipc::parcel::MsgParcel;
161 /// let mut msg = MsgParcel::new();
176 /// Writes a raw fd from a given file into this MsgParcel.
182 /// use ipc::parcel::MsgParcel;
184 /// let mut msg = MsgParcel::new();
208 /// Reads a file out of this MsgParcel, that created from the fd written
216 /// use ipc::parcel::MsgParcel;
217 /// let mut msg = MsgParcel::new();
242 /// use crate::parcel::MsgParcel;
244 /// let msg = MsgParcel::new();
259 /// use crate::parcel::MsgParcel;
261 /// let msg = MsgParcel::new();
302 /// Writes a RemoteObj into this MsgParcel.
306 /// use ipc::parcel::MsgParcel;
311 /// fn on_remote_request(&self, code: u32, data: &mut MsgParcel, reply: &mut MsgParcel) -> i32 {
318 /// let mut msg = MsgParcel::new();
326 /// Reads a RemoteObj from this MsgParcel.
330 /// use ipc::parcel::MsgParcel;
335 /// fn on_remote_request(&self, code: u32, data: &mut MsgParcel, reply: &mut MsgParcel) -> i32 {
342 /// let mut msg = MsgParcel::new();
363 /// Returns the size that this MsgParcel has written in bytes.
367 /// use ipc::parcel::MsgParcel;
369 /// let mut msg = MsgParcel::new();
381 /// use ipc::parcel::MsgParcel;
383 /// let mut msg = MsgParcel::new();
396 /// use ipc::parcel::MsgParcel;
398 /// let mut msg = MsgParcel::new();
410 /// use ipc::parcel::MsgParcel;
411 /// let msg = MsgParcel::new();
417 /// Returns the total bytes the MsgParcel can hold without reallocating.
421 /// use ipc::parcel::MsgParcel;
423 /// let mut msg = MsgParcel::new();
432 /// Returns the maximum capacity MsgParcel can allocate.
436 /// use ipc::parcel::MsgParcel;
438 /// let msg = MsgParcel::new();
449 /// use ipc::parcel::MsgParcel;
451 /// let mut msg = MsgParcel::new();
460 /// Returns the read_position of the MsgParcel in bytes.
464 /// use ipc::parcel::MsgParcel;
466 /// let mut msg = MsgParcel::new();
477 /// Changes the size of the MsgParcel.
484 /// use ipc::parcel::MsgParcel;
486 /// let mut msg = MsgParcel::new();
500 /// Changes the capacity of the MsgParcel.
507 /// use ipc::parcel::MsgParcel;
509 /// let msg = MsgParcel::new();
521 /// Changes the capacity of the MsgParcel.
528 /// use ipc::parcel::MsgParcel;
530 /// let mut msg = MsgParcel::new();
541 /// Changes the read position of the MsgParcel.
548 /// use ipc::parcel::MsgParcel;
550 /// let mut msg = MsgParcel::new();
564 /// Changes the write position of the MsgParcel.
571 /// use ipc::parcel::MsgParcel;
573 /// let mut msg = MsgParcel::new();
588 /// Skip read data in bytes of the MsgParcel
595 /// use ipc::parcel::MsgParcel;
597 /// let mut msg = MsgParcel::new();
748 impl Default for MsgParcel {
764 use super::MsgParcel;
769 /// 1. Creates a MsgParcel
770 /// 2. Writes a value to the MsgParcel and then check its data size.
773 let mut msg = MsgParcel::new();
816 /// 1. Creates a new MsgParcel.
818 /// 2. write a vector into this MsgParcel, and read_to_end check the
822 let mut msg = MsgParcel::new();