mirror of
https://codeberg.org/demostf/parser.git
synced 2026-06-03 10:14:06 +02:00
Merge pull request #26 from Gcommer/from_const
Add SendPropIdentifier::from_const
This commit is contained in:
commit
e7451375c2
1 changed files with 6 additions and 0 deletions
|
|
@ -1113,6 +1113,12 @@ impl SendPropIdentifier {
|
|||
SendPropIdentifier(hasher.finish())
|
||||
}
|
||||
|
||||
/// Construct a SendPropIdentifier from a u64; like std::convert::From<u64> but marked as
|
||||
/// const.
|
||||
pub const fn from_const(raw: u64) -> Self {
|
||||
SendPropIdentifier(raw)
|
||||
}
|
||||
|
||||
/// This returns an option because only props known at compile time will return a name here
|
||||
///
|
||||
/// If you need to know the name of every property you need to keep a map yourself
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue