pub struct SfxClient { /* private fields */ }Expand description
Connection with a self-extracting executable generated by cargo zng res --tool sfx.
Implementations§
Source§impl SfxClient
impl SfxClient
Sourcepub fn connect_blocking() -> Result<Self, SfxError>
pub fn connect_blocking() -> Result<Self, SfxError>
Connect with the “SFX_ARGS” defined server.
Sourcepub fn sfx_args(&self) -> &[Txt]
pub fn sfx_args(&self) -> &[Txt]
The command line arguments from the SFX executable.
Note that the sfx process that spawned this process is still running and replicating stdout/err from this process, impersonating the extracted executable.
These args are from the user, the std::env::args are from the sfx tool and are usually empty.
Sourcepub fn manifest(&self) -> &[SfxDataInfo]
pub fn manifest(&self) -> &[SfxDataInfo]
Info an all data the server can provide.
List is sorted by name.
Sourcepub fn info(&self, name: &str) -> Option<&SfxDataInfo>
pub fn info(&self, name: &str) -> Option<&SfxDataInfo>
Get name data info it it is in the server manifest.
Sourcepub fn read_blocking(&self, name: &str) -> Result<SfxReadBlocking, SfxError>
pub fn read_blocking(&self, name: &str) -> Result<SfxReadBlocking, SfxError>
Read raw data.
The sfx server will automatically decompress/decode data that was marked compress on build.
Trait Implementations§
impl StructuralPartialEq for SfxClient
Auto Trait Implementations§
impl Freeze for SfxClient
impl RefUnwindSafe for SfxClient
impl Send for SfxClient
impl Sync for SfxClient
impl Unpin for SfxClient
impl UnsafeUnpin for SfxClient
impl UnwindSafe for SfxClient
Blanket Implementations§
Source§impl<T> AnyVarValue for T
impl<T> AnyVarValue for T
Source§fn clone_boxed(&self) -> BoxAnyVarValue
fn clone_boxed(&self) -> BoxAnyVarValue
Clone the value.
Source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
Gets if
self and other are equal.Source§fn try_swap(&mut self, other: &mut (dyn AnyVarValue + 'static)) -> bool
fn try_swap(&mut self, other: &mut (dyn AnyVarValue + 'static)) -> bool
Swap value with
other if both are of the same type.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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FsChangeNote for T
impl<T> FsChangeNote for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<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>
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