pub struct AddBlock2App<'a, 'b> { /* private fields */ }
234
235
236
237
238
239
240
241
242
pub fn new_block<S: Into<Cow<'a, str>>>(&mut self, name: S) -> Result<AddBlock2App<'a, '_>> {
let name = name.into();
if self.find_block(name.clone()).is_some() {
Err(Error::DuplicatedBlockName(name.to_string()))
} else {
Ok(AddBlock2App::new(&mut self.blocks, 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.