Skip to main content

ResourceDescriptor

Struct ResourceDescriptor 

Source
pub struct ResourceDescriptor {
Show 14 fields pub class: ResourceClass, pub resource_id: String, pub name: String, pub version: String, pub description: String, pub category: String, pub capabilities: Vec<String>, pub creator_did: Option<String>, pub creator_wallet: Option<Address>, pub price_per_call: u128, pub is_available: bool, pub last_seen_at: u64, pub subtype: Option<String>, pub reputation: Option<u64>,
}
Expand description

Cross-registry projection of a single resource.

Fields§

§class: ResourceClass

Which registry this resource lives in.

§resource_id: String

Unique id in the source registry. Caller passes this back to tenzro_useResource(resource_id, params) for invocation.

§name: String§version: String§description: String§category: String§capabilities: Vec<String>

Capability tags lifted from the source registry. Used for the post-filter on tenzro_listResources(capability_tags=...).

§creator_did: Option<String>§creator_wallet: Option<Address>

Operator payout wallet. Tenants pay TNZO; the protocol splits 5% to treasury, 95% to this wallet.

§price_per_call: u128

Per-invocation cost in atto-TNZO. 0 = free.

§is_available: bool

true when the resource is Active in the source registry.

§last_seen_at: u64

Last liveness heartbeat (seconds). Helps the discovery layer surface staleness without filtering aggressively.

§subtype: Option<String>

Optional kind / sub-type from the source registry, projected as a plain string. E.g. for Tool this is the transport mode (mcp / mcp-stdio / mcp-sse / api / native); for Knowledge this is the kind (vector_index / feed / …).

§reputation: Option<u64>

Reputation score (0..=1000). None when the source registry doesn’t track reputation (only Models do today).

Trait Implementations§

Source§

impl Clone for ResourceDescriptor

Source§

fn clone(&self) -> ResourceDescriptor

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ResourceDescriptor

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ResourceDescriptor

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for ResourceDescriptor

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.