MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / get_message_by_name

Method get_message_by_name

crates/openshell-server/src/persistence/mod.rs:382–390  ·  view source on GitHub ↗

Fetch and decode a protobuf message by name.

(
        &self,
        name: &str,
    )

Source from the content-addressed store, hash-verified

380
381 /// Fetch and decode a protobuf message by name.
382 pub async fn get_message_by_name<T: Message + Default + ObjectType + SetResourceVersion>(
383 &self,
384 name: &str,
385 ) -> PersistenceResult<Option<T>> {
386 self.get_by_name(T::object_type(), name)
387 .await?
388 .map(decode_record)
389 .transpose()
390 }
391
392 /// List and decode protobuf messages, hydrating `resource_version` from
393 /// the authoritative DB row (mirrors `get_message`).

Calls 1

get_by_nameMethod · 0.45

Tested by

no test coverage detected