(
&self,
name: S,
root_activity: A,
)
| 277 | /// * `root_activity` - perform the clone operation with this activity as the root |
| 278 | #[must_use] |
| 279 | pub fn clone_to_with_root<S: BnStrCompatible, A: BnStrCompatible>( |
| 280 | &self, |
| 281 | name: S, |
| 282 | root_activity: A, |
| 283 | ) -> Ref<Workflow> { |
| 284 | let raw_name = name.into_bytes_with_nul(); |
| 285 | let activity = root_activity.into_bytes_with_nul(); |
| 286 | unsafe { |
| 287 | Self::ref_from_raw( |
| 288 | NonNull::new(BNWorkflowClone( |
| 289 | self.handle.as_ptr(), |
| 290 | raw_name.as_ref().as_ptr() as *const c_char, |
| 291 | activity.as_ref().as_ptr() as *const c_char, |
| 292 | )) |
| 293 | .unwrap(), |
| 294 | ) |
| 295 | } |
| 296 | } |
| 297 | |
| 298 | pub fn instance<S: BnStrCompatible>(name: S) -> Ref<Workflow> { |
| 299 | let result = unsafe { |
no test coverage detected