pub struct LegacyAdapterResource { /* private fields */ }Expand description
Wraps an Arc<dyn DriverAdapter> from the existing
per-phase factory under PerPhase policy. Used until
each adapter migrates to a real SharedResource impl
(Push B for CQL, Push C for HTTP / OpenAPI / stdout).
can_share() returns false so the pool refuses to
give a LegacyAdapterResource to a second shell — it’s
effectively single-use, matching today’s behaviour.
Most callers shouldn’t construct this directly — use
attach_legacy_adapter which handles the wrapping,
pool registration, and adapter unwrapping in one call.
Implementations§
Source§impl LegacyAdapterResource
impl LegacyAdapterResource
pub fn new(key: ResourceKey, adapter: Arc<dyn DriverAdapter>) -> Self
Sourcepub fn adapter(&self) -> Option<Arc<dyn DriverAdapter>>
pub fn adapter(&self) -> Option<Arc<dyn DriverAdapter>>
Borrow the wrapped legacy adapter. Returns None
after close() has consumed it.
Trait Implementations§
Legacy adapters are NOT yet declared shareable —
each phase gets its own. Push B / C migrate
adapters out of this shim and into real
can_share() = true impls.
Source§fn resource_key(&self) -> &ResourceKey
fn resource_key(&self) -> &ResourceKey
Source§fn close(self: Arc<Self>) -> ResourceFuture<'static, Result<(), String>>
fn close(self: Arc<Self>) -> ResourceFuture<'static, Result<(), String>>
Source§fn as_legacy_adapter(&self) -> Option<Arc<dyn DriverAdapter>>
fn as_legacy_adapter(&self) -> Option<Arc<dyn DriverAdapter>>
None; only LegacyAdapterResource
overrides it to surface its wrapped DriverAdapter
handle. Push B retires this entirely once each
adapter has its own SharedResource impl with no
hidden DriverAdapter inside. Read moreSource§fn can_support_more_load(&self) -> bool
fn can_support_more_load(&self) -> bool
Source§fn init(&self) -> ResourceFuture<'_, Result<(), String>>
fn init(&self) -> ResourceFuture<'_, Result<(), String>>
(key, generation).Source§fn accessor_payload(&self) -> Option<Arc<dyn Any + Send + Sync>>
fn accessor_payload(&self) -> Option<Arc<dyn Any + Send + Sync>>
Arc<dyn Any + Send + Sync>) a kernel node can obtain by
fingerprint through its kernel tree’s resource scope. The pool stores it on
the entry right after a successful init, and its
polydat::ResourceAccessor impl hands out clones. Default None
— a resource opts in only when it wants kernels to reach a live
handle (the first consumer is a CQL session handle, SRD-103); no
existing adapter is affected.Auto Trait Implementations§
impl !Freeze for LegacyAdapterResource
impl RefUnwindSafe for LegacyAdapterResource
impl Send for LegacyAdapterResource
impl Sync for LegacyAdapterResource
impl Unpin for LegacyAdapterResource
impl UnsafeUnpin for LegacyAdapterResource
impl UnwindSafe for LegacyAdapterResource
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
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> ⓘ
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