pub struct TestHelperSyscall { /* private fields */ }Implementations§
Source§impl TestHelperSyscall
impl TestHelperSyscall
pub fn set_ret_err(&self, name: ArgName, err: fn() -> Result<(), SyscallError>)
pub fn set_ret_err_times(&self, name: ArgName, times: usize)
pub fn get_setns_args(&self) -> Vec<(i32, CloneFlags)>
pub fn get_set_capability_args(&self) -> Vec<(CapSet, CapsHashSet)>
pub fn get_mount_args(&self) -> Vec<MountArgs>
pub fn get_mount_from_fd_args(&self) -> Vec<MountFromFdArgs>
pub fn get_symlink_args(&self) -> Vec<(PathBuf, PathBuf)>
pub fn get_mknod_args(&self) -> Vec<MknodArgs>
pub fn get_chown_args(&self) -> Vec<ChownArgs>
pub fn get_hostname_args(&self) -> Vec<String>
pub fn get_domainname_args(&self) -> Vec<String>
pub fn get_groups_args(&self) -> Vec<Gid>
pub fn get_io_priority_args(&self) -> Vec<IoPriorityArgs>
pub fn get_mempolicy_args(&self) -> Vec<MemPolicyArgs>
pub fn get_umount_args(&self) -> Vec<UMount2Args>
Trait Implementations§
Source§impl Default for TestHelperSyscall
impl Default for TestHelperSyscall
Source§fn default() -> TestHelperSyscall
fn default() -> TestHelperSyscall
Returns the “default value” for a type. Read more
Source§impl Syscall for TestHelperSyscall
impl Syscall for TestHelperSyscall
fn as_any(&self) -> &dyn Any
fn pivot_rootfs(&self, _path: &Path) -> Result<(), SyscallError>
fn set_ns(&self, rawfd: i32, nstype: CloneFlags) -> Result<(), SyscallError>
fn set_id(&self, _uid: Uid, _gid: Gid) -> Result<(), SyscallError>
fn set_capability( &self, cset: CapSet, value: &CapsHashSet, ) -> Result<(), SyscallError>
fn set_hostname(&self, hostname: &str) -> Result<(), SyscallError>
fn set_domainname(&self, domainname: &str) -> Result<(), SyscallError>
fn set_rlimit(&self, _rlimit: &PosixRlimit) -> Result<(), SyscallError>
fn get_pwuid(&self, _: u32) -> Option<Arc<OsStr>>
fn chroot(&self, _: &Path) -> Result<(), SyscallError>
fn mount( &self, source: Option<&Path>, target: &Path, fstype: Option<&str>, flags: MsFlags, data: Option<&str>, ) -> Result<(), SyscallError>
fn mount_from_fd( &self, source_fd: &OwnedFd, target: &Path, ) -> Result<(), SyscallError>
fn move_mount( &self, from_dirfd: BorrowedFd<'_>, from_path: Option<&str>, to_dirfd: BorrowedFd<'_>, to_path: Option<&str>, flags: u32, ) -> Result<(), SyscallError>
fn fsopen(&self, _: Option<&str>, _: u32) -> Result<OwnedFd, SyscallError>
fn fsconfig( &self, _: BorrowedFd<'_>, _: u32, _: Option<&str>, _: Option<&str>, _: c_int, ) -> Result<(), SyscallError>
fn fsmount( &self, _: BorrowedFd<'_>, _: u32, _: Option<u64>, ) -> Result<OwnedFd, SyscallError>
fn open_tree( &self, _: RawFd, _: Option<&str>, _: u32, ) -> Result<OwnedFd, SyscallError>
fn symlink(&self, original: &Path, link: &Path) -> Result<(), SyscallError>
fn mknod( &self, path: &Path, kind: SFlag, perm: Mode, dev: u64, ) -> Result<(), SyscallError>
fn chown( &self, path: &Path, owner: Option<Uid>, group: Option<Gid>, ) -> Result<(), SyscallError>
fn set_groups(&self, groups: &[Gid]) -> Result<(), SyscallError>
fn close_range(&self, _: i32) -> Result<(), SyscallError>
fn mount_setattr( &self, _: BorrowedFd<'_>, _: &Path, _: u32, _: &MountAttr, _: size_t, ) -> Result<(), SyscallError>
fn set_io_priority(&self, class: i64, priority: i64) -> Result<(), SyscallError>
fn set_mempolicy( &self, mode: i32, nodemask: &[c_ulong], maxnode: u64, ) -> Result<(), SyscallError>
fn umount2(&self, target: &Path, flags: MntFlags) -> Result<(), SyscallError>
fn get_uid(&self) -> Uid
fn get_gid(&self) -> Gid
fn get_euid(&self) -> Uid
fn get_egid(&self) -> Gid
fn personality(&self, _: PersonalityDomain) -> Result<(), SyscallError>
Auto Trait Implementations§
impl !Freeze for TestHelperSyscall
impl !RefUnwindSafe for TestHelperSyscall
impl !Send for TestHelperSyscall
impl !Sync for TestHelperSyscall
impl Unpin for TestHelperSyscall
impl UnsafeUnpin for TestHelperSyscall
impl !UnwindSafe for TestHelperSyscall
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more