pub trait ParameterMemref {
// Required method
fn buffer_len(&self) -> usize;
}Expand description
Shared buffer length for a memory-reference parameter.
Implemented by ParameterMemrefInput, ParameterMemrefOutput,
and ParameterMemrefInout. This is the supertrait of
ParameterMemrefRead and ParameterMemrefWrite.
The value is the size the host supplied for the shared buffer. OP-TEE
validates this range against the caller’s shared memory when the TA is
invoked, and the accessors in this module bound every read and write by
this size, so they cannot access past the host-supplied buffer. For output
and in/out parameters the size reported back to the host is updated
separately through ParameterMemrefWrite::set_updated_size; buffer_len
keeps returning the original host-supplied size.
Required Methods§
Sourcefn buffer_len(&self) -> usize
fn buffer_len(&self) -> usize
Returns the size of the shared buffer as supplied by the host, in bytes.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".