pub struct Options {
pub directory: PathBuf,
pub port: u16,
pub host: String,
pub origins: Vec<String>,
pub assets: Option<PathBuf>,
pub token: Option<String>,
}Expand description
What a link serves and who may reach it.
Fields§
§directory: PathBuf§port: u16§host: StringInterface to bind. Loopback by default; a server sets this on purpose.
origins: Vec<String>Pages allowed to open the socket. Empty accepts any page that holds the code, which is the loopback case.
assets: Option<PathBuf>An editor build to serve beside the link, so page and socket share one origin and the browser has nothing to negotiate.
token: Option<String>The pairing code to use. Without one the link keeps the code its
previous run left in .litz/editor.json, so a bookmark or a page that
remembered the URL survives a restart; a first run makes one.
Auto Trait Implementations§
impl Forget for Options
impl Freeze for Options
impl Move for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnsafeUnpin for Options
impl UnwindSafe for Options
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
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> ⓘ
Converts
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> ⓘ
Converts
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