pub struct RustCrate { /* private fields */ }
Expand description
Specifies a crate that uses hydro_deploy_integration
to be
deployed as a service.
Implementations§
Source§impl RustCrate
impl RustCrate
Sourcepub fn new(src: impl Into<PathBuf>, on: Arc<dyn Host>) -> Self
pub fn new(src: impl Into<PathBuf>, on: Arc<dyn Host>) -> Self
Creates a new RustCrate
that will be deployed on the given host.
The src
argument is the path to the crate’s directory, and the on
argument is the host that the crate will be deployed on.
Sourcepub fn bin(self, bin: impl Into<String>) -> Self
pub fn bin(self, bin: impl Into<String>) -> Self
Sets the target to be a binary with the given name,
equivalent to cargo run --bin <name>
.
Sourcepub fn example(self, example: impl Into<String>) -> Self
pub fn example(self, example: impl Into<String>) -> Self
Sets the target to be an example with the given name,
equivalent to cargo run --example <name>
.
Sourcepub fn profile(self, profile: impl Into<String>) -> Self
pub fn profile(self, profile: impl Into<String>) -> Self
Sets the profile to be used when building the crate.
Equivalent to cargo run --profile <profile>
.
pub fn rustflags(self, rustflags: impl Into<String>) -> Self
pub fn target_dir(self, target_dir: impl Into<PathBuf>) -> Self
pub fn no_default_features(self) -> Self
pub fn features( self, features: impl IntoIterator<Item = impl Into<String>>, ) -> Self
pub fn tracing(self, perf: impl Into<TracingOptions>) -> Self
Sourcepub fn args(self, args: impl IntoIterator<Item = impl Into<String>>) -> Self
pub fn args(self, args: impl IntoIterator<Item = impl Into<String>>) -> Self
Sets the arguments to be passed to the binary when it is launched.
Sourcepub fn display_name(self, display_name: impl Into<String>) -> Self
pub fn display_name(self, display_name: impl Into<String>) -> Self
Sets the display name for this service, which will be used in logging.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RustCrate
impl !RefUnwindSafe for RustCrate
impl Send for RustCrate
impl Sync for RustCrate
impl Unpin for RustCrate
impl !UnwindSafe for RustCrate
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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