Function il2_iltags::tags::assert_tag_id_and_type_or_error [−][src]
pub fn assert_tag_id_and_type_or_error<T: ILTag>(
tag_id: u64,
tag: &dyn ILTag,
error: ErrorKind
) -> Result<()>
Expand description
Verifies if a given ILTag
has the given tag Id and implements a specified
concrete type.
Arguments:
tag_id
: The expected tag id;tag
: The tag to be downcast;error
: The error to return in case of mismatch;
Returns:
Ok(())
: If the tag matches the criteria;Err(error)
: If the tag does not match the criteria;