pub struct BlockMut<'a, 'b> { /* private fields */ }
174
175
176
177
178
179
180
181
182
pub fn new_block<S: Into<Cow<'a, str>>>(&mut self, name: S) -> Result<BlockMut<'a, '_>, Error> {
let name = name.into();
if self.find_block(name.clone()).is_some() {
Err(Error::DuplicatedBlockName(name.to_string()))
} else {
Ok(BlockMut::new(self, name))
}
}
Executes the destructor for this type.
Read more
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From<T> for U
chooses to do.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.