pub struct InMemoryTransport { /* private fields */ }Expand description
인메모리 Transport (단일 프로세스 내 노드 간 통신)
테스트 및 단일 서버 시나리오에서 사용합니다.
QuicTransport로 교체 시 이 구조체만 대체하면 됩니다.
Implementations§
Source§impl InMemoryTransport
impl InMemoryTransport
pub fn new(sender: Sender<GridMessage>) -> Self
Trait Implementations§
Source§impl Transport for InMemoryTransport
impl Transport for InMemoryTransport
Source§fn send(&self, _target_node_id: u32, msg: GridMessage)
fn send(&self, _target_node_id: u32, msg: GridMessage)
특정 노드에게 메시지 전송
Source§fn recv(&self) -> Option<GridMessage>
fn recv(&self) -> Option<GridMessage>
메시지 수신 (비블로킹, 없으면 None)
Auto Trait Implementations§
impl !Freeze for InMemoryTransport
impl RefUnwindSafe for InMemoryTransport
impl Send for InMemoryTransport
impl Sync for InMemoryTransport
impl Unpin for InMemoryTransport
impl UnsafeUnpin for InMemoryTransport
impl UnwindSafe for InMemoryTransport
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more