#[repr(transparent)]pub struct Platform(_);
Expand description
A type containing information on the target platform which may optionally be provided to the compile calls
Implementations
sourceimpl Platform
impl Platform
sourcepub fn is_valid() -> Result<()>
pub fn is_valid() -> Result<()>
Utility function to test the current system architecture.
Hyperscan requires the Supplemental Streaming SIMD Extensions 3 instruction set. This function can be called on any x86 platform to determine if the system provides the required instruction set.
This function does not test for more advanced features if Hyperscan has been built for a more specific architecture, for example the AVX2 instruction set.
sourcepub fn host() -> Result<Platform>
pub fn host() -> Result<Platform>
Populates the platform information based on the current host.
sourcepub fn new(tune: Tune, cpu_features: CpuFeatures) -> Platform
pub fn new(tune: Tune, cpu_features: CpuFeatures) -> Platform
Constructs a target platform which may be used to guide the optimisation process of the compile.
Trait Implementations
sourceimpl AsMut<PlatformRef> for Platform
impl AsMut<PlatformRef> for Platform
sourcefn as_mut(&mut self) -> &mut PlatformRef
fn as_mut(&mut self) -> &mut PlatformRef
Converts this type into a mutable reference of the (usually inferred) input type.
sourceimpl AsRef<PlatformRef> for Platform
impl AsRef<PlatformRef> for Platform
sourcefn as_ref(&self) -> &PlatformRef
fn as_ref(&self) -> &PlatformRef
Converts this type into a shared reference of the (usually inferred) input type.
sourceimpl Borrow<PlatformRef> for Platform
impl Borrow<PlatformRef> for Platform
sourcefn borrow(&self) -> &PlatformRef
fn borrow(&self) -> &PlatformRef
Immutably borrows from an owned value. Read more
sourceimpl BorrowMut<PlatformRef> for Platform
impl BorrowMut<PlatformRef> for Platform
sourcefn borrow_mut(&mut self) -> &mut PlatformRef
fn borrow_mut(&mut self) -> &mut PlatformRef
Mutably borrows from an owned value. Read more
sourceimpl Deref for Platform
impl Deref for Platform
type Target = PlatformRef
type Target = PlatformRef
The resulting type after dereferencing.
sourcefn deref(&self) -> &PlatformRef
fn deref(&self) -> &PlatformRef
Dereferences the value.
sourceimpl DerefMut for Platform
impl DerefMut for Platform
sourcefn deref_mut(&mut self) -> &mut PlatformRef
fn deref_mut(&mut self) -> &mut PlatformRef
Mutably dereferences the value.
sourceimpl ForeignType for Platform
impl ForeignType for Platform
type CType = hs_platform_info
type CType = hs_platform_info
The raw C type.
type Ref = PlatformRef
type Ref = PlatformRef
The type representing a reference to this type.
sourceunsafe fn from_ptr(ptr: *mut hs_platform_info_t) -> Platform
unsafe fn from_ptr(ptr: *mut hs_platform_info_t) -> Platform
Constructs an instance of this type from its raw type. Read more
sourcefn as_ptr(&self) -> *mut hs_platform_info_t
fn as_ptr(&self) -> *mut hs_platform_info_t
Returns a raw pointer to the wrapped value.
impl Send for Platform
impl Sync for Platform
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more