Struct write_html::TagOpening 
source · pub struct TagOpening<'a, 't, W: Write> { /* private fields */ }Expand description
Represents a tag that is being opened.
Implementations§
source§impl<'a, 't, W: Write> TagOpening<'a, 't, W>
 
impl<'a, 't, W: Write> TagOpening<'a, 't, W>
sourcepub fn new(
    tag: &'t str,
    w: &'a mut W,
    compactability: Compactability
) -> Result<Self, Error>
 
pub fn new( tag: &'t str, w: &'a mut W, compactability: Compactability ) -> Result<Self, Error>
Creates a new TagOpening that will write to w.
sourcepub fn attr<'s>(
    &'s mut self,
    name: impl AttributeName,
    value: impl AttributeValue
) -> Result<&'s mut Self, Error>
 
pub fn attr<'s>( &'s mut self, name: impl AttributeName, value: impl AttributeValue ) -> Result<&'s mut Self, Error>
Adds an attribute to the tag.
Arguments
- name- The name of the attribute.
- value- The value of the attribute.
sourcepub fn with_attr(
    self,
    name: impl AttributeName,
    value: impl AttributeValue
) -> Result<Self, Error>
 
pub fn with_attr( self, name: impl AttributeName, value: impl AttributeValue ) -> Result<Self, Error>
Adds an attribute to the tag.
See [attr] for more information.
sourcepub fn with_attributes(self, attributes: impl Attributes) -> Result<Self, Error>
 
pub fn with_attributes(self, attributes: impl Attributes) -> Result<Self, Error>
Adds multiple attributes to the tag.
sourcepub fn inner_html(self) -> Result<InsideTagHtml<'a, 't, W>, Error>
 
pub fn inner_html(self) -> Result<InsideTagHtml<'a, 't, W>, Error>
Finishes the opening of the tag and returns a InsideTagHtml that can be used to write the contents of the tag.
Trait Implementations§
Auto Trait Implementations§
impl<'a, 't, W> RefUnwindSafe for TagOpening<'a, 't, W>where W: RefUnwindSafe,
impl<'a, 't, W> Send for TagOpening<'a, 't, W>where W: Send,
impl<'a, 't, W> Sync for TagOpening<'a, 't, W>where W: Sync,
impl<'a, 't, W> Unpin for TagOpening<'a, 't, W>
impl<'a, 't, W> !UnwindSafe for TagOpening<'a, 't, W>
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