Skip to main content

NotebookOptions

Struct NotebookOptions 

Source
pub struct NotebookOptions {
    pub dir: PathBuf,
    pub runtime_dir: PathBuf,
    pub venv_dir: PathBuf,
    pub python: Option<PathBuf>,
    pub bind: SocketAddr,
    pub token: String,
    pub cull_idle_secs: u64,
    pub repo: String,
    pub engine_http: SocketAddr,
}
Expand description

Fully resolved notebook-service options.

Fields§

§dir: PathBuf

Contents-API root (c.ServerApp.root_dir).

§runtime_dir: PathBuf

Sidecar runtime dir (generated config carrying the token + jupyter runtime files). Deliberately not under dir: the Contents API must not serve the token.

§venv_dir: PathBuf

Auto-provisioned venv root.

§python: Option<PathBuf>

Explicit interpreter (--notebooks-python); None = auto-provision the pinned venv at startup.

§bind: SocketAddr

Loopback bind for the sidecar. Port 0 = engine-assigned per attempt.

§token: String

Jupyter auth token (minted during resolve when not configured).

§cull_idle_secs: u64

Kernel idle culling timeout, seconds.

§repo: String

Default repository advertised to kernels (WARATAH_REPO).

§engine_http: SocketAddr

Loopback address of THIS compute’s HTTP server (WARATAH_URL).

Implementations§

Source§

impl NotebookOptions

Source

pub fn resolve( cli: NotebookCli, toml: Option<NotebooksToml>, defaults: NotebookDefaults, repo: String, ) -> Result<Self, NotebookError>

Merge CLI flags over the notebooks.toml values over the defaults.

Source

pub fn waratah_url(&self) -> String

WARATAH_URL: loopback root of this compute’s HTTP server.

An unspecified bind (0.0.0.0, ::) is normalized to 127.0.0.1 — kernels must dial the co-located engine over loopback, never the externally advertised wildcard.

Trait Implementations§

Source§

impl Clone for NotebookOptions

Source§

fn clone(&self) -> NotebookOptions

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NotebookOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more