pub struct CapabilityOffer {
pub id: String,
pub capability: CapabilityId,
pub provider: Option<CapabilityProviderRef>,
pub profiles: Vec<String>,
pub description: Option<String>,
pub metadata: CapabilityMetadata,
}Expand description
Offers a capability from a provider.
Fields§
§id: StringStable offer identifier.
capability: CapabilityIdCapability being offered.
provider: Option<CapabilityProviderRef>Provider implementation reference.
profiles: Vec<String>Profiles that this offer belongs to.
description: Option<String>Optional human-readable description.
metadata: CapabilityMetadataFree-form metadata.
Implementations§
Source§impl CapabilityOffer
impl CapabilityOffer
Sourcepub fn new(id: impl Into<String>, capability: CapabilityId) -> Self
pub fn new(id: impl Into<String>, capability: CapabilityId) -> Self
Creates a new capability offer.
Trait Implementations§
Source§impl Clone for CapabilityOffer
impl Clone for CapabilityOffer
Source§fn clone(&self) -> CapabilityOffer
fn clone(&self) -> CapabilityOffer
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CapabilityOffer
impl Debug for CapabilityOffer
Source§impl<'de> Deserialize<'de> for CapabilityOffer
impl<'de> Deserialize<'de> for CapabilityOffer
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 JsonSchema for CapabilityOffer
impl JsonSchema for CapabilityOffer
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for CapabilityOffer
impl PartialEq for CapabilityOffer
Source§impl Serialize for CapabilityOffer
impl Serialize for CapabilityOffer
impl Eq for CapabilityOffer
impl StructuralPartialEq for CapabilityOffer
Auto Trait Implementations§
impl Freeze for CapabilityOffer
impl RefUnwindSafe for CapabilityOffer
impl Send for CapabilityOffer
impl Sync for CapabilityOffer
impl Unpin for CapabilityOffer
impl UnsafeUnpin for CapabilityOffer
impl UnwindSafe for CapabilityOffer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more