66//! first mebibyte and the most recent mebibyte of console output.
77
88use dropshot:: HttpError ;
9- use propolis_api_types:: serial as api ;
9+ use propolis_api_types:: serial as api_serial ;
1010use serde:: { Deserialize , Serialize } ;
1111use std:: collections:: VecDeque ;
1212use std:: convert:: TryFrom ;
@@ -45,17 +45,19 @@ pub(crate) enum SerialHistoryOffset {
4545 MostRecent ( usize ) ,
4646}
4747
48- impl TryFrom < & api:: InstanceSerialConsoleStreamRequest > for SerialHistoryOffset {
48+ impl TryFrom < & api_serial:: InstanceSerialConsoleStreamRequest >
49+ for SerialHistoryOffset
50+ {
4951 type Error = ( ) ;
5052 fn try_from (
51- req : & api :: InstanceSerialConsoleStreamRequest ,
53+ req : & api_serial :: InstanceSerialConsoleStreamRequest ,
5254 ) -> Result < Self , ( ) > {
5355 match req {
54- api :: InstanceSerialConsoleStreamRequest {
56+ api_serial :: InstanceSerialConsoleStreamRequest {
5557 from_start : Some ( offset) ,
5658 most_recent : None ,
5759 } => Ok ( SerialHistoryOffset :: FromStart ( * offset as usize ) ) ,
58- api :: InstanceSerialConsoleStreamRequest {
60+ api_serial :: InstanceSerialConsoleStreamRequest {
5961 from_start : None ,
6062 most_recent : Some ( offset) ,
6163 } => Ok ( SerialHistoryOffset :: MostRecent ( * offset as usize ) ) ,
@@ -64,21 +66,21 @@ impl TryFrom<&api::InstanceSerialConsoleStreamRequest> for SerialHistoryOffset {
6466 }
6567}
6668
67- impl TryFrom < & api :: InstanceSerialConsoleHistoryRequest >
69+ impl TryFrom < & api_serial :: InstanceSerialConsoleHistoryRequest >
6870 for SerialHistoryOffset
6971{
7072 type Error = HttpError ;
7173
7274 fn try_from (
73- req : & api :: InstanceSerialConsoleHistoryRequest ,
75+ req : & api_serial :: InstanceSerialConsoleHistoryRequest ,
7476 ) -> Result < SerialHistoryOffset , HttpError > {
7577 match req {
76- api :: InstanceSerialConsoleHistoryRequest {
78+ api_serial :: InstanceSerialConsoleHistoryRequest {
7779 from_start : Some ( offset) ,
7880 most_recent : None ,
7981 ..
8082 } => Ok ( SerialHistoryOffset :: FromStart ( * offset as usize ) ) ,
81- api :: InstanceSerialConsoleHistoryRequest {
83+ api_serial :: InstanceSerialConsoleHistoryRequest {
8284 from_start : None ,
8385 most_recent : Some ( offset) ,
8486 ..
0 commit comments