+impl lightning::util::ser::Writeable for TypeRef {
+ fn write<W: lightning::util::ser::Writer>(&self, w: &mut W) -> Result<(), crate::c_types::io::Error> {
+ let vec = (self.0.write)(self.0.this_arg);
+ w.write_all(vec.as_slice())
+ }
+}
+#[no_mangle]
+/// Creates a copy of a Type
+pub extern "C" fn Type_clone(orig: &Type) -> Type {
+ let mut res = Type_clone_fields(orig);
+ if let Some(f) = orig.cloned { (f)(&mut res) };
+ res
+}
+impl Clone for Type {
+ fn clone(&self) -> Self {
+ Type_clone(self)
+ }
+}
+impl Clone for TypeRef {
+ fn clone(&self) -> Self {
+ Self(Type_clone(&self.0))
+ }
+}