pub struct CacheBuilder { /* private fields */ }Expand description
Builder struct for a tablet Cache.
This builder is only required for adding non-default include paths, use Cache::new() for a tablet cache that uses the defaults.
Implementations§
Source§impl CacheBuilder
impl CacheBuilder
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new, empty, CacheBuilder without any include paths. This info is only needed where include paths need to be modified, for standard invocations use Cache::new().
The typical invocation is
let cache = CacheBuilder::new()
.add_default_includes()
.build()?;The above example is equivalent to Cache::new().
Sourcepub fn add_default_includes(self) -> Self
pub fn add_default_includes(self) -> Self
Add the default set of include paths as compiled in, typically:
/usr/share/libwacom,/etc/libwacom$XDG_CONFIG_HOME/libwacom.
Sourcepub fn add_include(self, path: &Path) -> Self
pub fn add_include(self, path: &Path) -> Self
Add an include path at the current position. Include paths are processed in-order with a file in most recent path obscuring a file with the same name in an earlier include path.
Include paths to not need to exist, empty or non-existing include paths are ignored.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CacheBuilder
impl RefUnwindSafe for CacheBuilder
impl Send for CacheBuilder
impl Sync for CacheBuilder
impl Unpin for CacheBuilder
impl UnwindSafe for CacheBuilder
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