I would suggest extending them to SizeT
to match the signature of memcpy
in C.
Move this into the documentation for their respective functions. It is very difficult to refer to these examples when you are trying to look for how to use the APIs.
I don't really agree with the naming of the returning
family of functions, as it doesn't indicate to the caller that by invoking returning
it actually invokes the function as well.
MapStructFields
? Since the only operations its implementing classes do is to add fields based on some criteria, matching what map
does to an iterator. Or FieldMapper
.
Why are the type variables not directly bounded by LenKind
and Model
respectively then, rather than only bounding the impl
s?
I would suggest naming it llvm_type
. Use of get_
is discouraged in Rust AFAIK.
I suspect this might be a candidate for unsafe
, as it is a requirement for the caller to enforce this contract.,