pub struct SerializedArg { /* private fields */ }Expand description
A serialized representation of a single kernel argument.
Captures the argument’s optional name, data type, a human-readable string representation of its value, and its size in bytes.
Implementations§
Source§impl SerializedArg
impl SerializedArg
Sourcepub fn new(
name: Option<String>,
arg_type: ArgType,
value_repr: String,
size_bytes: usize,
) -> Self
pub fn new( name: Option<String>, arg_type: ArgType, value_repr: String, size_bytes: usize, ) -> Self
Creates a new SerializedArg.
Sourcepub fn value_repr(&self) -> &str
pub fn value_repr(&self) -> &str
Returns the string representation of the argument value.
Sourcepub fn size_bytes(&self) -> usize
pub fn size_bytes(&self) -> usize
Returns the size of this argument in bytes.
Sourcepub fn total_size(args: &[Self]) -> usize
pub fn total_size(args: &[Self]) -> usize
Returns the total size of all arguments in a slice.
Trait Implementations§
Source§impl Clone for SerializedArg
impl Clone for SerializedArg
Source§fn clone(&self) -> SerializedArg
fn clone(&self) -> SerializedArg
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SerializedArg
impl Debug for SerializedArg
Auto Trait Implementations§
impl Freeze for SerializedArg
impl RefUnwindSafe for SerializedArg
impl Send for SerializedArg
impl Sync for SerializedArg
impl Unpin for SerializedArg
impl UnsafeUnpin for SerializedArg
impl UnwindSafe for SerializedArg
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