pub struct Task { /* private fields */ }Expand description
Wraps SecTaskRef.
Implementations§
Source§impl Task
impl Task
Sourcepub fn current() -> Result<Self>
pub fn current() -> Result<Self>
Wraps the corresponding SecTaskRef operation.
Examples found in repository?
examples/07_code_signing_info.rs (line 7)
3fn main() -> Result<(), Box<dyn std::error::Error>> {
4 let code = Code::current()?;
5 let static_code = code.static_code()?;
6 let signing = code.signing_information()?;
7 let task = Task::current()?;
8 println!(
9 "path={:?} signed={} task_identifier={:?} validity_ok={}",
10 static_code.path()?.display(),
11 signing.is_signed(),
12 task.signing_identifier()?,
13 static_code.check_validity().is_ok()
14 );
15 Ok(())
16}Sourcepub fn current_with_audit_token() -> Result<Self>
pub fn current_with_audit_token() -> Result<Self>
Wraps the corresponding SecTaskRef operation.
Sourcepub fn signing_identifier(&self) -> Result<Option<String>>
pub fn signing_identifier(&self) -> Result<Option<String>>
Wraps the corresponding SecTaskRef operation.
Examples found in repository?
examples/07_code_signing_info.rs (line 12)
3fn main() -> Result<(), Box<dyn std::error::Error>> {
4 let code = Code::current()?;
5 let static_code = code.static_code()?;
6 let signing = code.signing_information()?;
7 let task = Task::current()?;
8 println!(
9 "path={:?} signed={} task_identifier={:?} validity_ok={}",
10 static_code.path()?.display(),
11 signing.is_signed(),
12 task.signing_identifier()?,
13 static_code.check_validity().is_ok()
14 );
15 Ok(())
16}Sourcepub fn entitlement(&self, entitlement: &str) -> Result<Option<Value>>
pub fn entitlement(&self, entitlement: &str) -> Result<Option<Value>>
Wraps the corresponding SecTaskRef operation.
Sourcepub fn entitlements(&self, entitlements: &[&str]) -> Result<Value>
pub fn entitlements(&self, entitlements: &[&str]) -> Result<Value>
Wraps the corresponding SecTaskRef operation.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Task
impl RefUnwindSafe for Task
impl !Send for Task
impl !Sync for Task
impl Unpin for Task
impl UnsafeUnpin for Task
impl UnwindSafe for Task
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