Function il2_iltags::tags::util::iltag_clone[][src]

pub fn iltag_clone(tag: &dyn ILTag) -> Result<Box<dyn ILTag>>
Expand description

Clones the given tag using a serialization/deserialization process. It is similar to iltag_clone_with_factory() but uses a ILStandardTagFactory instance runing on non strict mode.

It is important to notice that the cloned tag may not share the same implementation of the cloned tag as the resulting tag will be implemented only by the standard tags implemented by this library or by instances of super::ILRawTag for all unknown tags.

Arguments:

  • tag: The tag to be cloned;

Returns:

  • Ok(tag): The cloned tag;
  • Err(_): If the cloning process fails;