Skip to main content

check_not_foreign

Function check_not_foreign 

Source
pub async fn check_not_foreign<K>(
    api: &Api<K>,
    namespace: &str,
    name: &str,
    owner: &OwnerReference,
) -> ExecResult<Option<K>>
where K: Resource<DynamicType = ()> + Clone + DeserializeOwned + Debug,
Expand description

Read the object if present and fail on a foreign one, without writing. Use it to refuse early (for example before minting a token).