pub struct HostInfo { /* private fields */ }Expand description
Human-readable information and description about the host.
This information is passed to plugins at instantiation time by PluginInstance::new.
See the new method’s documentation for an example of how to instantiate it.
Implementations§
Source§impl HostInfo
impl HostInfo
Sourcepub fn new(
name: &str,
vendor: &str,
url: &str,
version: &str,
) -> Result<Self, NulError>
pub fn new( name: &str, vendor: &str, url: &str, version: &str, ) -> Result<Self, NulError>
Creates a new host information container from its components.
name: The name of the host. Example:"Bitwig Studio"vendor: The software vendor of the host. Example:"Bitwig GmbH"url: Example:"https://bitwig.com"version: The version string of the host. Example:"4.3.2"
All parameters are copied into new string buffers.
§Errors
All parameters must not contain the null (\0) character. If any of them do, a NulError is returned.
§Example
use clack_host::host::HostInfo;
let info = HostInfo::new("Bitwig Studio", "Bitwig GmbH", "https://bitwig.com", "4.3.2");Sourcepub fn new_from_cstring(
name: CString,
vendor: CString,
url: CString,
version: CString,
) -> Self
pub fn new_from_cstring( name: CString, vendor: CString, url: CString, version: CString, ) -> Self
Sourcepub fn from_plugin(info: &HostInfo<'_>) -> Self
Available on crate feature clack-plugin only.
pub fn from_plugin(info: &HostInfo<'_>) -> Self
clack-plugin only.Creates a new host information container using the data originally provided to a plugin.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HostInfo
impl RefUnwindSafe for HostInfo
impl Send for HostInfo
impl Sync for HostInfo
impl Unpin for HostInfo
impl UnsafeUnpin for HostInfo
impl UnwindSafe for HostInfo
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