pub struct Parent<C> { /* private fields */ }Expand description
The parent’s client, injected into a graft’s method:
parent: Parent<ShopClient> (the macro writes the transport,
ShopClient<ParentTransport>). It derefs to the client, so
parent.items() is the parent’s items; Parent::host is the
standard upward interface.
Implementations§
Source§impl<C> Parent<C>
impl<C> Parent<C>
Sourcepub fn new(
transport: ParentTransport,
make: impl FnOnce(ParentTransport) -> C,
) -> Self
pub fn new( transport: ParentTransport, make: impl FnOnce(ParentTransport) -> C, ) -> Self
The parent client makes over transport.
Sourcepub fn into_inner(self) -> C
pub fn into_inner(self) -> C
The parent’s client, owned.
Sourcepub fn transport(&self) -> &ParentTransport
pub fn transport(&self) -> &ParentTransport
The transport the client runs over.
Trait Implementations§
Auto Trait Implementations§
impl<C> !RefUnwindSafe for Parent<C>
impl<C> !UnwindSafe for Parent<C>
impl<C> Forget for Parent<C>
impl<C> Freeze for Parent<C>where
C: Freeze,
impl<C> Send for Parent<C>where
C: Send,
impl<C> Sync for Parent<C>where
C: Sync,
impl<C> Unpin for Parent<C>where
C: Unpin,
impl<C> UnsafeUnpin for Parent<C>where
C: UnsafeUnpin,
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