@@ -416,17 +416,17 @@ struct Idle<T> {
416
416
}
417
417
418
418
pub enum Transport < K : Key , T : Poolable > {
419
- Pooled ( Pooled < K , T > ) ,
420
- UnPooled ( T ) ,
419
+ TcpOrUnix ( Pooled < K , T > ) ,
420
+ Shm ( T ) ,
421
421
}
422
422
423
423
impl < E : Encoder , D : Decoder > Transport < Address , ThriftTransport < E , D > > {
424
424
pub async fn reuse ( self ) {
425
425
match self {
426
- Transport :: Pooled ( pooled) => {
426
+ Transport :: TcpOrUnix ( pooled) => {
427
427
pooled. reuse ( ) . await ;
428
428
}
429
- Transport :: UnPooled ( t) => {
429
+ Transport :: Shm ( t) => {
430
430
t. reuse ( ) . await ;
431
431
}
432
432
}
@@ -435,30 +435,30 @@ impl<E: Encoder, D: Decoder> Transport<Address, ThriftTransport<E, D>> {
435
435
436
436
impl < K : Key , T : Poolable > From < Pooled < K , T > > for Transport < K , T > {
437
437
fn from ( pooled : Pooled < K , T > ) -> Self {
438
- Transport :: Pooled ( pooled)
438
+ Transport :: TcpOrUnix ( pooled)
439
439
}
440
440
}
441
441
442
442
impl < K : Key , T : Poolable > From < T > for Transport < K , T > {
443
443
fn from ( t : T ) -> Self {
444
- Transport :: UnPooled ( t)
444
+ Transport :: Shm ( t)
445
445
}
446
446
}
447
447
448
448
impl < K : Key , T : Poolable > AsRef < T > for Transport < K , T > {
449
449
fn as_ref ( & self ) -> & T {
450
450
match self {
451
- Transport :: Pooled ( pooled) => pooled. t . as_ref ( ) . expect ( "not dropped" ) ,
452
- Transport :: UnPooled ( t) => t,
451
+ Transport :: TcpOrUnix ( pooled) => pooled. t . as_ref ( ) . expect ( "not dropped" ) ,
452
+ Transport :: Shm ( t) => t,
453
453
}
454
454
}
455
455
}
456
456
457
457
impl < K : Key , T : Poolable > AsMut < T > for Transport < K , T > {
458
458
fn as_mut ( & mut self ) -> & mut T {
459
459
match self {
460
- Transport :: Pooled ( pooled) => pooled. t . as_mut ( ) . expect ( "not dropped" ) ,
461
- Transport :: UnPooled ( t) => t,
460
+ Transport :: TcpOrUnix ( pooled) => pooled. t . as_mut ( ) . expect ( "not dropped" ) ,
461
+ Transport :: Shm ( t) => t,
462
462
}
463
463
}
464
464
}
0 commit comments