MCPcopy Create free account
hub / github.com/chirpstack/chirpstack / get_device

Function get_device

chirpstack/src/storage/device_profile.rs:613–620  ·  view source on GitHub ↗
(id: Uuid)

Source from the content-addressed store, hash-verified

611}
612
613pub async fn get_device(id: Uuid) -> Result<Device, Error> {
614 let d = device_profile_device::table
615 .find(&fields::Uuid::from(id))
616 .first(&mut get_async_db_conn().await?)
617 .await
618 .map_err(|e| Error::from_diesel(e, id.to_string()))?;
619 Ok(d)
620}
621
622pub async fn get_vendor(id: Uuid) -> Result<Vendor, Error> {
623 let v = device_profile_vendor::table

Callers 2

test_device_profileFunction · 0.85
get_deviceMethod · 0.85

Calls 2

to_stringMethod · 0.80
get_async_db_connFunction · 0.70

Tested by 1

test_device_profileFunction · 0.68