#[non_exhaustive]pub enum Attribute {
Observable,
Interface(&'static str),
ResourceType(&'static str),
Title(&'static str),
Ct(u16),
Sz(usize),
Other(&'static str),
}Expand description
A property an advertised resource can have many of.
This corresponds to target attributes in Link Format, and also to properties in CoRAL without being very final yet.
This is a single type with static string out-references, but likely to be generalized later into a trait (but right now it’s insufficiently known what it’ll need to produce).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Observable
Interface(&'static str)
ResourceType(&'static str)
Title(&'static str)
Ct(u16)
Sz(usize)
Other(&'static str)
An arbitrary value rendered verbatim into an Link Format document (between ; or ,
depending on its position).
It is preferred to emit attributes explicitly: This both supports any non-RFC6690 outputs that can work from that more easily, and dynamic data.
Implementations§
Source§impl Attribute
impl Attribute
Sourcepub fn write_link_format(&self, w: &mut impl Write) -> Result
pub fn write_link_format(&self, w: &mut impl Write) -> Result
Serializes the attribute into RFC6690 Link Format.
Any attribute that can be serialized (currently and expectedly: all) produces a single
semicolon (;) followed by some key and possibly an equals sign (=) and a (possibly
quoted) value.