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<SfxClient, SfxError>
pub fn connect_blocking() -> Result<SfxClient, SfxError>
Connect with the “SFX_ARGS” defined server.
Sourcepub async fn connect() -> Result<SfxClient, SfxError>
pub async fn connect() -> Result<SfxClient, 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§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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