MCPcopy Create free account
hub / github.com/hashintel/hash / map

Method map

libs/@local/graph/postgres-store/src/store/validation.rs:43–49  ·  view source on GitHub ↗
(self, func: impl FnOnce(T) -> U)

Source from the content-addressed store, hash-verified

41
42impl<T> Access<T> {
43 fn map<U>(self, func: impl FnOnce(T) -> U) -> Access<U> {
44 match self {
45 Self::Granted(value) => Access::Granted(func(value)),
46 Self::Denied => Access::Denied,
47 Self::Malformed => Access::Malformed,
48 }
49 }
50
51 const fn as_ref(&self) -> Access<&T> {
52 match self {

Callers 15

fetch_ontology_typesMethod · 0.45
insert_external_typesMethod · 0.45
create_data_typesMethod · 0.45
update_data_typesMethod · 0.45
create_property_typesMethod · 0.45
update_property_typesMethod · 0.45
create_entity_typesMethod · 0.45
update_entity_typesMethod · 0.45
visit_arrayMethod · 0.45

Calls 1

funcFunction · 0.85

Tested by 15

permit_with_forbidFunction · 0.36
action_namesFunction · 0.36
generateMethod · 0.36
assert_equalityFunction · 0.36
test_compilationFunction · 0.36
test_conditionFunction · 0.36
global_policiesFunction · 0.36
actor_type_policiesFunction · 0.36
specific_actor_policiesFunction · 0.36
role_based_policiesFunction · 0.36
team_hierarchy_policiesFunction · 0.36