pub struct Block {
pub items: Vec<ConfigItem>,
pub span: Span,
pub raw_content: Option<String>,
pub closing_brace_leading_whitespace: String,
pub trailing_whitespace: String,
}Expand description
A brace-delimited block ({ … }).
For Lua blocks (e.g. content_by_lua_block), the content is stored verbatim
in raw_content instead of being parsed as directives.
Use is_raw() to check.
Fields§
§items: Vec<ConfigItem>Parsed items inside the block (empty for raw blocks).
span: SpanSpan from { to } (inclusive of both braces).
raw_content: Option<String>Raw content for special blocks like *_by_lua_block (Lua code)
closing_brace_leading_whitespace: StringLeading whitespace before closing brace (for indentation checking)
trailing_whitespace: StringTrailing whitespace after closing brace (for trailing-whitespace detection)
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Block
impl<'de> Deserialize<'de> for Block
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 Freeze for Block
impl RefUnwindSafe for Block
impl Send for Block
impl Sync for Block
impl Unpin for Block
impl UnsafeUnpin for Block
impl UnwindSafe for Block
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