pub struct Context { /* private fields */ }
Expand description
An object that holds a UCP communication instance’s global information.
Implementations§
Source§impl Context
impl Context
Sourcepub fn new() -> Result<Arc<Self>, Error>
pub fn new() -> Result<Arc<Self>, Error>
Creates and initializes a UCP application context with default configuration.
Sourcepub fn new_with_config(config: &Config) -> Result<Arc<Self>, Error>
pub fn new_with_config(config: &Config) -> Result<Arc<Self>, Error>
Creates and initializes a UCP application context with specified configuration.
Sourcepub fn print_to_stderr(&self)
pub fn print_to_stderr(&self)
Prints information about the context configuration.
Including memory domains, transport resources, and other useful information associated with the context.
Sourcepub fn query(&self) -> Result<ucp_context_attr, Error>
pub fn query(&self) -> Result<ucp_context_attr, Error>
Fetches information about the context.
Trait Implementations§
impl Send for Context
impl Sync for Context
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