pub unsafe trait StructureChain<H>:
AsRef<H>
+ AsMut<H>
+ Sizedwhere
H: ExtendableStructure,{
// Required methods
fn get_mut<T: ExtendingStructure<H>>(&mut self) -> &mut T;
fn get<T: ExtendingStructure<H>>(&self) -> &T;
fn unlink<T: ExtendingStructure<H>>(&mut self);
fn link<T: ExtendingStructure<H>>(&mut self);
}Expand description
Structure chain trait
Required Methods§
Sourcefn get_mut<T: ExtendingStructure<H>>(&mut self) -> &mut T
fn get_mut<T: ExtendingStructure<H>>(&mut self) -> &mut T
Return a mutable reference to the given structure Will panic if this structure is not part of the structure chain
Sourcefn get<T: ExtendingStructure<H>>(&self) -> &T
fn get<T: ExtendingStructure<H>>(&self) -> &T
Return a reference to the given structure Will panic if this structure is not part of the structure chain
Sourcefn unlink<T: ExtendingStructure<H>>(&mut self)
fn unlink<T: ExtendingStructure<H>>(&mut self)
Unlink the given structure from the chain Will panic if this structure is not part of the structure chain
Sourcefn link<T: ExtendingStructure<H>>(&mut self)
fn link<T: ExtendingStructure<H>>(&mut self)
Link the given structure from the chain Do not call this on a structure that has not been unlinked previously Calling link on an already linked structure is safe but has the side effect of unlinking all the other structures linked before the two link calls (which you probably do not want) Will panic if this structure is not part of the structure chain
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.