Struct abbau_types::Attribute
source · pub struct Attribute {
pub id: Option<String>,
pub doc: Option<String>,
pub doc_ref: Option<StringOrArray>,
pub ty: Option<TypeRef>,
pub size: Option<String>,
pub if_expr: Option<String>,
pub repeat: Option<Repeat>,
pub repeat_expr: Option<String>,
pub repeat_until: Option<String>,
pub contents: Option<Contents>,
pub encoding: Option<String>,
pub enum: Option<String>,
}
Expand description
An attribute in a type schema
Fields§
§id: Option<String>
Unique Identifier within this struct
Attributes with the same name are merged
doc: Option<String>
Used to give a more detailed description of a user-defined type.
doc_ref: Option<StringOrArray>
Reference to external documentation
ty: Option<TypeRef>
The type of this attribute
size: Option<String>
The size of this attribute (if present, creates a substream)
if_expr: Option<String>
The size of this attribute (if present, creates a substream)
repeat: Option<Repeat>
Whether this attribute is repeated
repeat_expr: Option<String>
If Repeat::Expr, the expression to repeat
repeat_until: Option<String>
If Repeat::Expr, the expression to check for repetition end
contents: Option<Contents>
Fixed expected contents
encoding: Option<String>
String encoding
enum: Option<String>
Name of an enumeration
Trait Implementations§
source§impl<'de> Deserialize<'de> for Attribute
impl<'de> Deserialize<'de> for Attribute
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
Auto Trait Implementations§
impl RefUnwindSafe for Attribute
impl Send for Attribute
impl Sync for Attribute
impl Unpin for Attribute
impl UnwindSafe for Attribute
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