[−][src]Trait pui_core::Identifier
An Identifier
is a process unique identifier
you are guaranteed that two instances of this identifier will never compare equal You can also get a token that this identifier recognizes, which you can use to mark other types as logically owned by the identifier. No other identifier will recognize tokens made be a different identifier while both identifiers are live.
Safety
ident.owns(&token)
must return true for anytoken
returned fromident.token()
regardless of when the token was created.- If two tokens compare equal, then
Identifier::owns
must act the same for both of them- i.e. it must return false for both tokens, or it must return true for both tokens
- Two instances of
Identifier
must never return true for the same token if either the two identifier or the tokens they generate can both exist on the same thread.
Associated Types
Loading content...Required methods
Loading content...Provided methods
pub fn owns_token(&self, token: &Self::Token) -> bool
[src]
Check if this token was created by this identifier