pub trait JavaHash {
// Required method
fn java_hash(&self, hash_type: HashType) -> i64;
}Expand description
Rust analogue of G.hashFn(t).apply(o): the Java long hash of a value
under the given hash type. Implemented for Value in core.rs and for
the plain Java-like primitives here. Collection element types in
lang::data hash through this trait so the HashType dispatches all the
way down nested structures.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl JavaHash for String
Plain strings hash identically under every hash type: G.hashFn(t)
only dispatches on IHash objects, everything else takes hashValue,
which for a Java String is String.hashCode.
impl JavaHash for String
Plain strings hash identically under every hash type: G.hashFn(t)
only dispatches on IHash objects, everything else takes hashValue,
which for a Java String is String.hashCode.