pub enum JavaDistribution {
Temurin,
GraalVM,
Zulu,
Liberica,
}Expand description
Available Java distributions
Variants§
Implementations§
Source§impl JavaDistribution
impl JavaDistribution
Sourcepub fn supports_version(&self, version: u8) -> bool
pub fn supports_version(&self, version: u8) -> bool
Returns whether this distribution publishes version for the
current platform.
Known gaps:
- Temurin: no Java 8 for macOS ARM64 (Apple Silicon released after Java 8 reached EOL).
- GraalVM: Java 17+ only.
Sourcepub fn get_fallback(&self, version: u8) -> Option<JavaDistribution>
pub fn get_fallback(&self, version: u8) -> Option<JavaDistribution>
Returns a fallback distribution for (self, version) if self
does not support that version on the current platform.
Returns None when no fallback is needed (self is supported).
Fallback candidates are tried in order: Zulu → Liberica → Temurin
(decreasing platform coverage).
Sourcepub async fn get_download_url(
&self,
jre_version: &u8,
) -> DistributionResult<String>
pub async fn get_download_url( &self, jre_version: &u8, ) -> DistributionResult<String>
Gets download URL for the distribution
Trait Implementations§
Source§impl Clone for JavaDistribution
impl Clone for JavaDistribution
Source§fn clone(&self) -> JavaDistribution
fn clone(&self) -> JavaDistribution
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for JavaDistribution
impl Debug for JavaDistribution
Source§impl Default for JavaDistribution
impl Default for JavaDistribution
Source§impl<'de> Deserialize<'de> for JavaDistribution
impl<'de> Deserialize<'de> for JavaDistribution
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for JavaDistribution
impl PartialEq for JavaDistribution
Source§fn eq(&self, other: &JavaDistribution) -> bool
fn eq(&self, other: &JavaDistribution) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for JavaDistribution
impl Serialize for JavaDistribution
impl StructuralPartialEq for JavaDistribution
Auto Trait Implementations§
impl Freeze for JavaDistribution
impl RefUnwindSafe for JavaDistribution
impl Send for JavaDistribution
impl Sync for JavaDistribution
impl Unpin for JavaDistribution
impl UnsafeUnpin for JavaDistribution
impl UnwindSafe for JavaDistribution
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