#[non_exhaustive]pub struct DelimitedBlock<'a> {
pub metadata: BlockMetadata<'a>,
pub inner: DelimitedBlockType<'a>,
pub delimiter: &'a str,
pub title: Title<'a>,
pub location: Location,
pub open_delimiter_location: Option<Location>,
pub close_delimiter_location: Option<Location>,
}Expand description
A DelimitedBlock represents a delimited block in a document.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.metadata: BlockMetadata<'a>§inner: DelimitedBlockType<'a>§delimiter: &'a str§title: Title<'a>§location: Location§open_delimiter_location: Option<Location>§close_delimiter_location: Option<Location>Implementations§
Source§impl<'a> DelimitedBlock<'a>
impl<'a> DelimitedBlock<'a>
Sourcepub fn new(
inner: DelimitedBlockType<'a>,
delimiter: &'a str,
location: Location,
) -> Self
pub fn new( inner: DelimitedBlockType<'a>, delimiter: &'a str, location: Location, ) -> Self
Create a new delimited block.
Sourcepub fn with_metadata(self, metadata: BlockMetadata<'a>) -> Self
pub fn with_metadata(self, metadata: BlockMetadata<'a>) -> Self
Set the metadata.
Sourcepub fn with_title(self, title: Title<'a>) -> Self
pub fn with_title(self, title: Title<'a>) -> Self
Set the title.
Trait Implementations§
Source§impl<'a> Clone for DelimitedBlock<'a>
impl<'a> Clone for DelimitedBlock<'a>
Source§fn clone(&self) -> DelimitedBlock<'a>
fn clone(&self) -> DelimitedBlock<'a>
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<'a> Debug for DelimitedBlock<'a>
impl<'a> Debug for DelimitedBlock<'a>
Source§impl<'a> PartialEq for DelimitedBlock<'a>
impl<'a> PartialEq for DelimitedBlock<'a>
Source§impl Serialize for DelimitedBlock<'_>
impl Serialize for DelimitedBlock<'_>
impl<'a> StructuralPartialEq for DelimitedBlock<'a>
Auto Trait Implementations§
impl<'a> Freeze for DelimitedBlock<'a>
impl<'a> RefUnwindSafe for DelimitedBlock<'a>
impl<'a> Send for DelimitedBlock<'a>
impl<'a> Sync for DelimitedBlock<'a>
impl<'a> Unpin for DelimitedBlock<'a>
impl<'a> UnsafeUnpin for DelimitedBlock<'a>
impl<'a> UnwindSafe for DelimitedBlock<'a>
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