pub struct DeviceAccess {
pub authorized_keys: Option<PathBuf>,
pub sb: PathBuf,
/* private fields */
}Expand description
Where this device lets its identity’s other devices in over ssh, and a flag that asks the sync loop for a full round at once.
Fields§
None leaves authorized_keys alone, as tests and embedders want.
sb: PathBufThe sb the forced command runs.
Implementations§
Source§impl DeviceAccess
impl DeviceAccess
Sourcepub fn for_this_user() -> Self
pub fn for_this_user() -> Self
The daemon’s own: ~/.ssh/authorized_keys, and the sb installed
beside this binary.
pub fn kick(&self)
pub fn take_kick(&self) -> bool
Sourcepub fn reconcile(&self, sqlite: &SqliteStore, data_dir: &Path) -> Result<()>
pub fn reconcile(&self, sqlite: &SqliteStore, data_dir: &Path) -> Result<()>
Grants every active device of this identity its forced-command line and pins its host key, and cuts both for revoked devices and rows of another identity (a device that moved to a new identity cuts the old one’s). Runs after pairing, after every handshake and removal, and at start. Cuts come first and each step runs even when one before it failed; the error names every failure.
Sourcepub fn sweep(&self, sqlite: &SqliteStore, data_dir: &Path)
pub fn sweep(&self, sqlite: &SqliteStore, data_dir: &Path)
reconcile, logged rather than failing the caller: a handshake or
removal that succeeded stays a success, and the next one retries.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for DeviceAccess
impl Forget for DeviceAccess
impl Move for DeviceAccess
impl RefUnwindSafe for DeviceAccess
impl Send for DeviceAccess
impl Sync for DeviceAccess
impl Unpin for DeviceAccess
impl UnsafeUnpin for DeviceAccess
impl UnwindSafe for DeviceAccess
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> Fruit for T
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> ⓘ
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> ⓘ
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().