#[non_exhaustive]pub struct NotebookIdleShutdownConfig {
pub idle_timeout: Option<Duration>,
pub idle_shutdown_disabled: bool,
/* private fields */
}Available on crate feature
notebook-service only.Expand description
The idle shutdown configuration of NotebookRuntimeTemplate, which contains the idle_timeout as required field.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.idle_timeout: Option<Duration>Required. Duration is accurate to the second. In Notebook, Idle Timeout is accurate to minute so the range of idle_timeout (second) is: 10 * 60 ~ 1440
idle_shutdown_disabled: boolWhether Idle Shutdown is disabled in this NotebookRuntimeTemplate.
Implementations§
Source§impl NotebookIdleShutdownConfig
impl NotebookIdleShutdownConfig
pub fn new() -> Self
Sourcepub fn set_idle_timeout<T>(self, v: T) -> Self
pub fn set_idle_timeout<T>(self, v: T) -> Self
Sets the value of idle_timeout.
§Example
ⓘ
use wkt::Duration;
let x = NotebookIdleShutdownConfig::new().set_idle_timeout(Duration::default()/* use setters */);Sourcepub fn set_or_clear_idle_timeout<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_idle_timeout<T>(self, v: Option<T>) -> Self
Sets or clears the value of idle_timeout.
§Example
ⓘ
use wkt::Duration;
let x = NotebookIdleShutdownConfig::new().set_or_clear_idle_timeout(Some(Duration::default()/* use setters */));
let x = NotebookIdleShutdownConfig::new().set_or_clear_idle_timeout(None::<Duration>);Sourcepub fn set_idle_shutdown_disabled<T: Into<bool>>(self, v: T) -> Self
pub fn set_idle_shutdown_disabled<T: Into<bool>>(self, v: T) -> Self
Sets the value of idle_shutdown_disabled.
§Example
ⓘ
let x = NotebookIdleShutdownConfig::new().set_idle_shutdown_disabled(true);Trait Implementations§
Source§impl Clone for NotebookIdleShutdownConfig
impl Clone for NotebookIdleShutdownConfig
Source§fn clone(&self) -> NotebookIdleShutdownConfig
fn clone(&self) -> NotebookIdleShutdownConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NotebookIdleShutdownConfig
impl Debug for NotebookIdleShutdownConfig
Source§impl Default for NotebookIdleShutdownConfig
impl Default for NotebookIdleShutdownConfig
Source§fn default() -> NotebookIdleShutdownConfig
fn default() -> NotebookIdleShutdownConfig
Returns the “default value” for a type. Read more
Source§impl Message for NotebookIdleShutdownConfig
impl Message for NotebookIdleShutdownConfig
impl StructuralPartialEq for NotebookIdleShutdownConfig
Auto Trait Implementations§
impl Freeze for NotebookIdleShutdownConfig
impl RefUnwindSafe for NotebookIdleShutdownConfig
impl Send for NotebookIdleShutdownConfig
impl Sync for NotebookIdleShutdownConfig
impl Unpin for NotebookIdleShutdownConfig
impl UnwindSafe for NotebookIdleShutdownConfig
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