pub struct Context {
pub stream: Stream,
/* private fields */
}
Expand description
NPP stream context structure.
Fields§
§stream: Stream
Implementations§
Source§impl Context
impl Context
Sourcepub fn from_null_stream() -> Self
pub fn from_null_stream() -> Self
Create context on null stream.
This creates a context that can be passed to NPP functions. Any functions using this context will be executed on the null stream.
Sourcepub fn from_stream(stream: Stream) -> Self
pub fn from_stream(stream: Stream) -> Self
Create context.
This creates an NPP context object. It can be passed to NPP functions, and they will execute on the associated stream.
§Arguments
stream
- Stream to associate with context.
Trait Implementations§
impl Send for Context
§Safety
This is safe because the way we use the underlying NppStreamContext
object is thread-safe.
impl Sync for Context
§Safety
This is safe because the way we use the underlying NppStreamContext
object is thread-safe.
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl Unpin for Context
impl UnwindSafe for Context
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