pub struct PropertiesAndReason {
pub tags: Box<[Property]>,
pub desc: Option<Str>,
}Fields§
§desc: Option<Str>Implementations§
Source§impl PropertiesAndReason
impl PropertiesAndReason
Sourcepub fn gen_doc(&self) -> TokenStream
pub fn gen_doc(&self) -> TokenStream
Generate
/// Grouped desc
/// * SP1: desc
/// * SP2: descSourcepub fn gen_hover_doc(&self) -> Box<str>
pub fn gen_hover_doc(&self) -> Box<str>
Safety doc rendered through LSP hover.
pub fn need_gen_doc(&self) -> bool
Sourcepub fn new_single_sp(name: &str) -> Self
pub fn new_single_sp(name: &str) -> Self
Direct construct the string as a single property, without validating the spec.
Sourcepub fn parse_sp_str(s: &str) -> Result<Self>
pub fn parse_sp_str(s: &str) -> Result<Self>
The argument must be in the syntax of Tag or any(Tag1, Tag2, ...),
with optional reasons, but without validating the spec.
This is identical to be syn::parse_str::<PropertiesAndReason>(s).
Trait Implementations§
Source§impl Debug for PropertiesAndReason
impl Debug for PropertiesAndReason
Source§impl<'de> Deserialize<'de> for PropertiesAndReason
impl<'de> Deserialize<'de> for PropertiesAndReason
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 Parse for PropertiesAndReason
impl Parse for PropertiesAndReason
fn parse(input: ParseStream<'_>) -> Result<Self>
Auto Trait Implementations§
impl !Send for PropertiesAndReason
impl !Sync for PropertiesAndReason
impl Freeze for PropertiesAndReason
impl RefUnwindSafe for PropertiesAndReason
impl Unpin for PropertiesAndReason
impl UnsafeUnpin for PropertiesAndReason
impl UnwindSafe for PropertiesAndReason
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