pub struct ObjectTransformLayerRef {
ptr: LLVMOrcObjectTransformLayerRef,
}Expand description
A reference to an object transform layer.
The transform layer sits between the IR compiler and the object linking layer. A transform callback can inspect or modify the compiled object buffer before linking.
Fields§
§ptr: LLVMOrcObjectTransformLayerRefImplementations§
Source§impl ObjectTransformLayerRef
impl ObjectTransformLayerRef
Sourcepub unsafe fn from_inner(ptr: LLVMOrcObjectTransformLayerRef) -> Self
pub unsafe fn from_inner(ptr: LLVMOrcObjectTransformLayerRef) -> Self
Wraps a raw pointer.
Sourcepub fn set_transform(&self, f: fn(&[u8]) -> Result<Option<Vec<u8>>, String>)
pub fn set_transform(&self, f: fn(&[u8]) -> Result<Option<Vec<u8>>, String>)
Set the transform function on this object transform layer.
The callback receives the compiled object buffer as &[u8]. Returning Ok(None)
passes the buffer through unchanged; returning Ok(Some(new_bytes)) replaces it.
Returning Err aborts materialization.
Trait Implementations§
impl Send for ObjectTransformLayerRef
impl Sync for ObjectTransformLayerRef
Auto Trait Implementations§
impl Freeze for ObjectTransformLayerRef
impl RefUnwindSafe for ObjectTransformLayerRef
impl Unpin for ObjectTransformLayerRef
impl UnsafeUnpin for ObjectTransformLayerRef
impl UnwindSafe for ObjectTransformLayerRef
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
§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>
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 8 bytes