difftreelog
chore fixed code review requests
in: master
1 file changed
pallets/structure/src/lib.rsdiffbeforeafterboth42//!42//!43//! ## Interface43//! ## Interface44//!44//!45//! ### Dispatchable Functions45//! ### Available Functions46//!46//!47//! - `find_parent` - Find parent of the token. It could be an account or another token.47//! - `find_parent` - Find parent of the token. It could be an account or another token.48//! - `parent_chain` - Find chain of parents of the token.48//! - `parent_chain` - Find chain of parents of the token.49//! - `find_topmost_owner` - Find account or token in the end of the chain of parents.49//! - `find_topmost_owner` - Find account or token in the end of the chain of parents.50//! - `check_nesting` - Check if the token could be nested in the other token50//! - `check_nesting` - Check if the token could be nested in the other token51//! - `nest_if_sent_to_token` - Nest the token in the other token51//! - `nest_if_sent_to_token` - Nest the token in the other token52//! - `unnest_if_nested` - Unnest the token from the other token52//! - `unnest_if_nested` - Unnest the token from the other token53//!54//! ## Assumptions55//!56//! * Total issued balanced of all accounts should be less than `Config::Balance::max_value()`.575358#![cfg_attr(not(feature = "std"), no_std)]54#![cfg_attr(not(feature = "std"), no_std)]5955218 })214 })219 }215 }220216221 /// Find the topmost parent and check that assigning `for_nest` token as a parent for217 /// Find the topmost parent and check that assigning `for_nest` token as a child for222 /// any token in the parents chain wouldn't create a cycle.218 /// `token` wouldn't create a cycle.223 ///219 ///224 /// - `budget`: Limit for searching parents in depth.220 /// - `budget`: Limit for searching parents in depth.225 pub fn get_checked_topmost_owner(221 pub fn get_checked_topmost_owner(271 ///267 ///272 /// Returns `true` if `user` is `token`'s owner. Or If token is provided as `user` then268 /// Returns `true` if `user` is `token`'s owner. Or If token is provided as `user` then273 /// check that `user` and `token` have same owner.269 /// check that `user` and `token` have same owner.274 /// Checks that assigning `for_nest` token as a parent for any token in the `token`'s270 /// Checks that assigning `for_nest` token as a child for `token` wouldn't create a cycle.275 /// parents chain wouldn't create a cycle.276 ///271 ///277 /// - `budget`: Limit for searching parents in depth.272 /// - `budget`: Limit for searching parents in depth.278 pub fn check_indirectly_owned(273 pub fn check_indirectly_owned(