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 Optionswhere
RawVecInner: Send,
impl Sync for Optionswhere
RawVecInner: Sync,
impl Unpin for Options
impl UnsafeUnpin for Optionswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for Optionswhere
RawVecInner: UnwindSafe,
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