pub struct Lib<'b> { /* private fields */ }
Expand description
A handler for a library built by Cabal.
Implementations§
Source§impl<'b> Lib<'b>
impl<'b> Lib<'b>
Sourcepub fn link(&self, rpath: bool) -> Result<()>
pub fn link(&self, rpath: bool) -> Result<()>
Link the crate to the dynamic library.
If rpath
is true, the runpath of the resulting executable is modified to include the
directory of the compiled foreign library.
Sourcepub fn bindings(&self) -> Result<Builder>
pub fn bindings(&self) -> Result<Builder>
Return a bindgen::Builder
for generating the Rust bindings of the dynamic library. The
builder is already configued for the correct header and includes files; additional
configuration may be performed as necessary.
See documentation for bindgen::Builder
.
Sourcepub fn link_system(&self, rpath: bool) -> Result<()>
pub fn link_system(&self, rpath: bool) -> Result<()>
Link the crate to the Haskell system libraries, which are discovered via ghc-pkg
.
If rpath
is true, the runpath of the resulting executable is modified to include the
directory of the system libraries.
Trait Implementations§
Auto Trait Implementations§
impl<'b> Freeze for Lib<'b>
impl<'b> RefUnwindSafe for Lib<'b>
impl<'b> Send for Lib<'b>
impl<'b> Sync for Lib<'b>
impl<'b> Unpin for Lib<'b>
impl<'b> UnwindSafe for Lib<'b>
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> 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