pub enum NextjsRenderEnvironment {
ServerComponent,
ClientSsr,
ClientHydrated,
EdgeRuntime,
NodeServer,
}Expand description
Next.js rendering environment where a component executes.
Determines what capabilities are available. The WASM runtime is only
usable in ClientComponent after hydration.
Variants§
ServerComponent
Server Component — no WASM, no browser APIs, no state/effects.
ClientSsr
Client Component during SSR pass — no WASM, limited browser APIs.
ClientHydrated
Client Component after hydration — full WASM and browser APIs.
EdgeRuntime
Edge Runtime — no WASM, limited Node APIs.
NodeServer
Node.js API route / Server Action — no WASM, full Node APIs.
Implementations§
Source§impl NextjsRenderEnvironment
impl NextjsRenderEnvironment
Sourcepub fn supports_wasm_runtime(self) -> bool
pub fn supports_wasm_runtime(self) -> bool
Returns true if this environment supports WASM runtime initialization.
Sourcepub fn has_browser_apis(self) -> bool
pub fn has_browser_apis(self) -> bool
Returns true if browser APIs (DOM, fetch with credentials, etc.) are available.
Sourcepub fn is_server_side(self) -> bool
pub fn is_server_side(self) -> bool
Returns true if this is a server-side environment.
Sourcepub fn boundary_mode(self) -> NextjsBoundaryMode
pub fn boundary_mode(self) -> NextjsBoundaryMode
Returns the normalized boundary mode for this environment.
Sourcepub fn runtime_fallback(self) -> NextjsRuntimeFallback
pub fn runtime_fallback(self) -> NextjsRuntimeFallback
Returns deterministic fallback behavior when runtime capability is unavailable.
Sourcepub fn runtime_fallback_reason(self) -> &'static str
pub fn runtime_fallback_reason(self) -> &'static str
Human-readable fallback guidance for diagnostics and docs.
Trait Implementations§
Source§impl Clone for NextjsRenderEnvironment
impl Clone for NextjsRenderEnvironment
Source§fn clone(&self) -> NextjsRenderEnvironment
fn clone(&self) -> NextjsRenderEnvironment
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for NextjsRenderEnvironment
Source§impl Debug for NextjsRenderEnvironment
impl Debug for NextjsRenderEnvironment
Source§impl<'de> Deserialize<'de> for NextjsRenderEnvironment
impl<'de> Deserialize<'de> for NextjsRenderEnvironment
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for NextjsRenderEnvironment
Source§impl Hash for NextjsRenderEnvironment
impl Hash for NextjsRenderEnvironment
Source§impl PartialEq for NextjsRenderEnvironment
impl PartialEq for NextjsRenderEnvironment
Source§fn eq(&self, other: &NextjsRenderEnvironment) -> bool
fn eq(&self, other: &NextjsRenderEnvironment) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for NextjsRenderEnvironment
impl Serialize for NextjsRenderEnvironment
impl StructuralPartialEq for NextjsRenderEnvironment
Auto Trait Implementations§
impl Freeze for NextjsRenderEnvironment
impl RefUnwindSafe for NextjsRenderEnvironment
impl Send for NextjsRenderEnvironment
impl Sync for NextjsRenderEnvironment
impl Unpin for NextjsRenderEnvironment
impl UnsafeUnpin for NextjsRenderEnvironment
impl UnwindSafe for NextjsRenderEnvironment
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> 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