|
|
@ -145,6 +145,7 @@ impl CircuitBoard {
|
|
|
|
return custom_data;
|
|
|
|
return custom_data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
pub struct Label<'a> {
|
|
|
|
pub struct Label<'a> {
|
|
|
|
text: &'a str,
|
|
|
|
text: &'a str,
|
|
|
|
color: Vec<u8>,
|
|
|
|
color: Vec<u8>,
|
|
|
@ -225,6 +226,18 @@ impl<'a> Label<'a> {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pub struct Mount {
|
|
|
|
|
|
|
|
height: Int,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Mount {
|
|
|
|
|
|
|
|
pub fn new(height: Int) -> Self {
|
|
|
|
|
|
|
|
Self { height }
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn custom_data(&self) -> Vec<u8> {
|
|
|
|
|
|
|
|
return Vec::from(self.height.to_le_bytes());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
impl<T: BinarySerializable> BinarySerializable for Vec<T> {
|
|
|
|
impl<T: BinarySerializable> BinarySerializable for Vec<T> {
|
|
|
|
fn write_to<W: Write>(&self, writer: &mut W) -> io::Result<()> {
|
|
|
|
fn write_to<W: Write>(&self, writer: &mut W) -> io::Result<()> {
|
|
|
|
writer.write_all(&(self.len() as Int).to_le_bytes())?;
|
|
|
|
writer.write_all(&(self.len() as Int).to_le_bytes())?;
|
|
|
|